SlideShare a Scribd company logo
FreeBSD Wireless Captive Portal
                                     Written by: Justin Wilde

Every IS and CS major should have their own server that they maintain and administrate.
The problem comes in choosing a platform that will have both a practical application and yet
still allow the administrator to continue learning. A UNIX based router is one such solution.
It is a piece of hardware you can interact and learn with daily. A variety of useful tools will
be at your finger tips from web caching to firewall rule creation.

Here are a few other advantages of building your own BSD router:
        Upgradeable and repairable
        More robust and adaptable
        Hands on experience with a Unix based system
        Added Security

What the future holds for a Unix/Linux based system is in large part only limited by the
user’s skill and imagination. In this tutorial we will be using pfSense, a distribution based on
FreeBSD 6.2.

The server will act primarily as a captive portal, wireless router, and firewall. For those not
familiar with the terminology, a captive portal reroutes all internet access requests to an
authentication page. Once the user has authenticated, they can browse the web freely until
their session ends, or they logout. This is just one of several different roles the system will
be capable of taking.

Many of the components have been removed to allow use with embedded devices, and to
increase the overall performance. Despite this, the FreeBSD package system (pkg_add) is
still available which keeps your possibilities open.

Recommended Hardware Items to have on hand:
Pentium 3 or equivalent AMD Processor
256 MB RAM
10 GB Hard Drive
1 Intel or 3com Network Card
1 Atheros based wireless NIC (Check compatibility at http://madwifi.org/wiki/Compatibility)
1 CD-ROM
1 PFSense Live CD
(Download at: http://pfsense.untouchable.net/downloads/pfSense-1.2-BETA-1-LiveCD-
Installer.iso.gz or visit www.pfsense.com)

You can check any piece of hardware you aren’t sure about using this resource:
http://www.freebsd.org/releases/6.1R/hardware-i386.html

Instructions
Installation
1. Start by entering you computer Bios and set your CD-Rom as the first boot device. Most
    bios will indicate which key to press to enter setup.
2. Allow approximately 1 minute for the system to load to the interface assignment screen.
3. When prompted if you want setup VLANs press the letter n and then enter on the
    keyboard.
4. Choose your LAN interface by putting in its three letter abbreviation and pressing enter.
    The abbreviations are shown above with their corresponding MAC addresses. Note that
    if you are building a wireless router, you should select the Ethernet interface here.
5. Type the abbreviated name for the interface you want to be the WAN and press enter.
6. Mark y and press enter to proceed afterwards.
7. Wait for the menu to load, and type 99 and press enter to start the install.
8. Press enter on Accept the video settings and then again on Install pfSsense
9. Select the hard drive you want to install pfSense on.
10. Press enter on Format this Disk, Use this geometry, Format (Disk name)
11. Press enter again on the Partition the Disk, Accept and create, Yes partition, and OK.
12. Now select accept and install the bootblocks, select OK, select the primary partition
    (usually the top partition), select OK, and select OK again.
13. Select Accept and create using the default swap setting unless you have a reason to make
    them larger.
14. The install process should start at this point. If for some reason it fails jump down to
    install troubleshooting.
15. After it finishes, select reboot, and make sure to take the CD out of the system.

Troubleshooting
1. Enter the bios and change your hard drive access mode to LBA.
2. When you are presented with different boot options, select the boot option with ACPI
    disabled.
Also see the pfSense wiki:
http://wiki.pfsense.com/wikka.php?wakka=BootTroubleShooting

Configuring the router
1. Wait for the router to full reboot, you should get the same menu, if you had to boot with
   ACPI disabled. You can turn it off permanently by selecting option number 8 from the
   menu and executing the following command:
         echo "hint.acpi.0.disabled=1" >> /boot/loader.conf
2. Connect your computer to the LAN interface of the router, note that most computers will
   require a crossover cable to do so. You may also use standard network cables with a
   switch or a hub to connect to the system. You should receive an address on the
   192.168.1.0/24 network.
3. Open your web browser and point it to http://192.168.1.1. The default username and
   password is admin/pfsense.
4. Using the mouse, select system, setup wizard. The system will then guide you through a
   basic setup process.

Configuring the Wireless Card:
1. As the web interface is somewhat limited, get into the pfSense terminal and execute the
   following commands:
       cd /usr/local/etc/rc.d
       vi wireless.sh
       put in the following lines:
               sysctl dev.ath.0.txantenna=1
               sysctl dev.ath.0.txantenna=1
               sysctl dev.ath.0.diversity=0
       Save the file, and use chmod to make it readable and executable. This file will be
       executed each time the system starts. It will indicate that you only have one antenna
       and you want to transmit and receive on both. You may also add this to the main
       config.xml file, but that is beyond the scope of this document. For more information
       on wireless settings visit:
       http://doc.pfsense.org/index.php/Wireless_networking_with_pfSense
2. Using the web interface again, go to WAN, Interfaces. Enter the desired setting as
   instructed.
3. Go to Interface, (assign), and swap cards making the LAN > WAN and vice versa.
4. Connect to the access point with the SSID that you indicated on the setup page.
5. To check your wireless performance, use the Status > Interfaces > LAN page. Each card
   will vary in the required configuration, work with the configuration until you aren’t
   receiving In/Out errors.

Setting up the captive portal
1. In the administration interface, go to services, then captive portal and check enable.
2. Create a login page using the form variables provided in the upload instructions within
    the web interface. This is found further down the captive portal page.
3. Upload your page to the captive portal, and enable the local user manager.
4. Add the users through the “users” tab.
5. Make sure your computer’s DNS is set to the firewall IP address.
6. Open a web browser; and you should be redirected to the page you created.
7. Try and login using the username and password you made on the portal page.
8. If all went well you will be passed through to the redirect page you specified or your
    browsers homepage.

Download the latest updates for the system at the following address:
http://snapshots.pfsense.org/FreeBSD6/RELENG_1_2/updates/

For an opportunity to help in the development of this project, the web forum is a great place
to start. It presents the opportunity to apply some of what you have learned, extend that
knowledge, and allow others to benefit from it. Visit www.pfsense.com and take a shot at
giving something back to the open source community.

More Related Content

PPT
Installing NetWare 5 Servers
PDF
How to install mikrotik in virtual environment (first assignment)
PDF
Documentation freenas
DOCX
Documentation free nas
PPT
Install and configure linux
PDF
install CentOS 6.3 minimal on Hyper-V
PPTX
Step for installing linux server
PPTX
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
Installing NetWare 5 Servers
How to install mikrotik in virtual environment (first assignment)
Documentation freenas
Documentation free nas
Install and configure linux
install CentOS 6.3 minimal on Hyper-V
Step for installing linux server
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"

What's hot (20)

PDF
How to publish your NAS on the Internet?
PDF
Installing and Setup Web Server
PPTX
Elastix installation
PDF
Netxms install guide
PDF
66_pfSenseTutorial
PDF
setting up v ms
PPTX
High performance content hosting
PDF
How to Block Malicious Address by Using Feed Service?
PDF
Run mac os x on pc
DOCX
Installation of oracle 12c RAC on linux vm
PDF
VMware Interview questions and answers
PDF
Gluster Storage Platform Installation Guide
PDF
How To Install Windows 11
PDF
Oracle virtual server-2-t0-3-upgrade
PDF
Installing R H E L 5
PPTX
Mac osx snow leopard 10
DOCX
PDF
02.12.2012 ubuntu 12.1 server guide
DOCX
Aix install via nim
PDF
Lamp Server With Drupal Installation
How to publish your NAS on the Internet?
Installing and Setup Web Server
Elastix installation
Netxms install guide
66_pfSenseTutorial
setting up v ms
High performance content hosting
How to Block Malicious Address by Using Feed Service?
Run mac os x on pc
Installation of oracle 12c RAC on linux vm
VMware Interview questions and answers
Gluster Storage Platform Installation Guide
How To Install Windows 11
Oracle virtual server-2-t0-3-upgrade
Installing R H E L 5
Mac osx snow leopard 10
02.12.2012 ubuntu 12.1 server guide
Aix install via nim
Lamp Server With Drupal Installation
Ad

Viewers also liked (17)

ODT
Modul 0-pengantar
DOC
PDF
Hacom%20pf sense%20quick start%20guide
PDF
66 pf sensetutorial
PDF
Nicholaus ufoakses
PDF
11 mac address table characteristic configuration
PDF
05 interface appended characteristic configuration
ODT
Modul 1-instalasi
PDF
Firewall ip filter
PDF
Megis mpls
PDF
Pfsense%20%20note
PDF
Mikrotik%20 most%20wanted
PDF
Modul 1-instalasi
DOC
9210 commissioning manual
PDF
Mplsvpn seminar
PDF
Modul 0-pengantar
DOC
Berryman ip addressing_guide
Modul 0-pengantar
Hacom%20pf sense%20quick start%20guide
66 pf sensetutorial
Nicholaus ufoakses
11 mac address table characteristic configuration
05 interface appended characteristic configuration
Modul 1-instalasi
Firewall ip filter
Megis mpls
Pfsense%20%20note
Mikrotik%20 most%20wanted
Modul 1-instalasi
9210 commissioning manual
Mplsvpn seminar
Modul 0-pengantar
Berryman ip addressing_guide
Ad

Similar to Bsd routers (20)

PDF
Installation of pfSense on Soekris 6501
PDF
Installation of pfSense on Soekris 6501
PDF
Console Menu - pfSense Hangout December 2016
PPTX
pfSense Installation Slide
PDF
the-pfsense-documentation.pdf
PDF
66_pfSenseTutorial
PDF
Pf sense installation and initial setup
PDF
Asiabsdcon2013
PDF
Don't Get Hacked on Hostile WiFi
PDF
Scale2013
PDF
BSDCan2006.pdf
PDF
Web Server Free Bsd
PDF
OSDC 2018 | OPNsense: the “open” firewall for your datacenter by Thomas Niede...
PDF
66 pfsense tutorial
PDF
pfSense 2.2 Preview - pfSense Hangout November 2014
PDF
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
PDF
Multi wanversion1.2
PDF
Linux hpc-cluster-setup-guide
PDF
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
PDF
All about linux gaining root remote exploitation
Installation of pfSense on Soekris 6501
Installation of pfSense on Soekris 6501
Console Menu - pfSense Hangout December 2016
pfSense Installation Slide
the-pfsense-documentation.pdf
66_pfSenseTutorial
Pf sense installation and initial setup
Asiabsdcon2013
Don't Get Hacked on Hostile WiFi
Scale2013
BSDCan2006.pdf
Web Server Free Bsd
OSDC 2018 | OPNsense: the “open” firewall for your datacenter by Thomas Niede...
66 pfsense tutorial
pfSense 2.2 Preview - pfSense Hangout November 2014
Backup and Restore with pfSense 2.4 - pfSense Hangout August 2017
Multi wanversion1.2
Linux hpc-cluster-setup-guide
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
All about linux gaining root remote exploitation

More from HARRY CHAN PUTRA (18)

PPTX
Basic Switch dan Vlan 33333333333333333333
PDF
07 VLAN Principle and Configuration.pdf
PDF
12 link aggregation configuration
PDF
Bdcom s2508 b hardware installation manual
DOC
Zxdsl 9210 guide
PDF
Slimsinserver2go
PDF
Olivevme110usermanualid
PDF
Modul 10 vicon
PDF
Modul 9 pengelolaan_infra
PDF
Modul 8 vo_ip
PDF
Modul 7 infrastruktur
DOC
PDF
W2k router
PDF
Vpn gw2gw
PDF
Vo ip rt-rw-net
PDF
Virtual host examples_-_apache_http_server
PDF
Using aphace-as-proxy-server
PDF
Using linux as_a_router
Basic Switch dan Vlan 33333333333333333333
07 VLAN Principle and Configuration.pdf
12 link aggregation configuration
Bdcom s2508 b hardware installation manual
Zxdsl 9210 guide
Slimsinserver2go
Olivevme110usermanualid
Modul 10 vicon
Modul 9 pengelolaan_infra
Modul 8 vo_ip
Modul 7 infrastruktur
W2k router
Vpn gw2gw
Vo ip rt-rw-net
Virtual host examples_-_apache_http_server
Using aphace-as-proxy-server
Using linux as_a_router

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Tartificialntelligence_presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
August Patch Tuesday
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
project resource management chapter-09.pdf
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Zenith AI: Advanced Artificial Intelligence
Tartificialntelligence_presentation.pptx
Approach and Philosophy of On baking technology
August Patch Tuesday
Enhancing emotion recognition model for a student engagement use case through...
OMC Textile Division Presentation 2021.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Group 1 Presentation -Planning and Decision Making .pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Building Integrated photovoltaic BIPV_UPV.pdf
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
WOOl fibre morphology and structure.pdf for textiles
project resource management chapter-09.pdf
Web App vs Mobile App What Should You Build First.pdf
Encapsulation_ Review paper, used for researhc scholars
cloud_computing_Infrastucture_as_cloud_p
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Bsd routers

  • 1. FreeBSD Wireless Captive Portal Written by: Justin Wilde Every IS and CS major should have their own server that they maintain and administrate. The problem comes in choosing a platform that will have both a practical application and yet still allow the administrator to continue learning. A UNIX based router is one such solution. It is a piece of hardware you can interact and learn with daily. A variety of useful tools will be at your finger tips from web caching to firewall rule creation. Here are a few other advantages of building your own BSD router:  Upgradeable and repairable  More robust and adaptable  Hands on experience with a Unix based system  Added Security What the future holds for a Unix/Linux based system is in large part only limited by the user’s skill and imagination. In this tutorial we will be using pfSense, a distribution based on FreeBSD 6.2. The server will act primarily as a captive portal, wireless router, and firewall. For those not familiar with the terminology, a captive portal reroutes all internet access requests to an authentication page. Once the user has authenticated, they can browse the web freely until their session ends, or they logout. This is just one of several different roles the system will be capable of taking. Many of the components have been removed to allow use with embedded devices, and to increase the overall performance. Despite this, the FreeBSD package system (pkg_add) is still available which keeps your possibilities open. Recommended Hardware Items to have on hand: Pentium 3 or equivalent AMD Processor 256 MB RAM 10 GB Hard Drive 1 Intel or 3com Network Card 1 Atheros based wireless NIC (Check compatibility at http://madwifi.org/wiki/Compatibility) 1 CD-ROM 1 PFSense Live CD (Download at: http://pfsense.untouchable.net/downloads/pfSense-1.2-BETA-1-LiveCD- Installer.iso.gz or visit www.pfsense.com) You can check any piece of hardware you aren’t sure about using this resource: http://www.freebsd.org/releases/6.1R/hardware-i386.html Instructions
  • 2. Installation 1. Start by entering you computer Bios and set your CD-Rom as the first boot device. Most bios will indicate which key to press to enter setup. 2. Allow approximately 1 minute for the system to load to the interface assignment screen. 3. When prompted if you want setup VLANs press the letter n and then enter on the keyboard. 4. Choose your LAN interface by putting in its three letter abbreviation and pressing enter. The abbreviations are shown above with their corresponding MAC addresses. Note that if you are building a wireless router, you should select the Ethernet interface here. 5. Type the abbreviated name for the interface you want to be the WAN and press enter. 6. Mark y and press enter to proceed afterwards. 7. Wait for the menu to load, and type 99 and press enter to start the install. 8. Press enter on Accept the video settings and then again on Install pfSsense 9. Select the hard drive you want to install pfSense on. 10. Press enter on Format this Disk, Use this geometry, Format (Disk name) 11. Press enter again on the Partition the Disk, Accept and create, Yes partition, and OK. 12. Now select accept and install the bootblocks, select OK, select the primary partition (usually the top partition), select OK, and select OK again. 13. Select Accept and create using the default swap setting unless you have a reason to make them larger. 14. The install process should start at this point. If for some reason it fails jump down to install troubleshooting. 15. After it finishes, select reboot, and make sure to take the CD out of the system. Troubleshooting 1. Enter the bios and change your hard drive access mode to LBA. 2. When you are presented with different boot options, select the boot option with ACPI disabled. Also see the pfSense wiki: http://wiki.pfsense.com/wikka.php?wakka=BootTroubleShooting Configuring the router 1. Wait for the router to full reboot, you should get the same menu, if you had to boot with ACPI disabled. You can turn it off permanently by selecting option number 8 from the menu and executing the following command: echo "hint.acpi.0.disabled=1" >> /boot/loader.conf 2. Connect your computer to the LAN interface of the router, note that most computers will require a crossover cable to do so. You may also use standard network cables with a switch or a hub to connect to the system. You should receive an address on the 192.168.1.0/24 network. 3. Open your web browser and point it to http://192.168.1.1. The default username and password is admin/pfsense. 4. Using the mouse, select system, setup wizard. The system will then guide you through a basic setup process. Configuring the Wireless Card:
  • 3. 1. As the web interface is somewhat limited, get into the pfSense terminal and execute the following commands: cd /usr/local/etc/rc.d vi wireless.sh put in the following lines: sysctl dev.ath.0.txantenna=1 sysctl dev.ath.0.txantenna=1 sysctl dev.ath.0.diversity=0 Save the file, and use chmod to make it readable and executable. This file will be executed each time the system starts. It will indicate that you only have one antenna and you want to transmit and receive on both. You may also add this to the main config.xml file, but that is beyond the scope of this document. For more information on wireless settings visit: http://doc.pfsense.org/index.php/Wireless_networking_with_pfSense 2. Using the web interface again, go to WAN, Interfaces. Enter the desired setting as instructed. 3. Go to Interface, (assign), and swap cards making the LAN > WAN and vice versa. 4. Connect to the access point with the SSID that you indicated on the setup page. 5. To check your wireless performance, use the Status > Interfaces > LAN page. Each card will vary in the required configuration, work with the configuration until you aren’t receiving In/Out errors. Setting up the captive portal 1. In the administration interface, go to services, then captive portal and check enable. 2. Create a login page using the form variables provided in the upload instructions within the web interface. This is found further down the captive portal page. 3. Upload your page to the captive portal, and enable the local user manager. 4. Add the users through the “users” tab. 5. Make sure your computer’s DNS is set to the firewall IP address. 6. Open a web browser; and you should be redirected to the page you created. 7. Try and login using the username and password you made on the portal page. 8. If all went well you will be passed through to the redirect page you specified or your browsers homepage. Download the latest updates for the system at the following address: http://snapshots.pfsense.org/FreeBSD6/RELENG_1_2/updates/ For an opportunity to help in the development of this project, the web forum is a great place to start. It presents the opportunity to apply some of what you have learned, extend that knowledge, and allow others to benefit from it. Visit www.pfsense.com and take a shot at giving something back to the open source community.