Configuring a Wireless Internet Access Point


It's become increasingly popular in recent years to create a network in your home or office completely free of wires, using any of the widely available 802.11 (Wi-Fi) wireless access systems on the market. These devices act as NAT-capable gateway routers in their own right, and they have the added bonus of broadcasting wireless signals to any authenticated computers in the vicinity. Fortunately, your FreeBSD router can perform these same functions just as well, if equipped with a supported wireless card.

Currently, FreeBSD's capabilities to act as a wireless access point require that you have a wireless card supported by the wi driver; these cards include any that use the Lucent Hermes, Intersil PRISM series, and Symbol Spectrum24 chipsets. Make sure (using the ifconfig -a command) that FreeBSD recognizes your wireless card and that it's supported by the wi driver (you should see a network device entry for wi0 in the ifconfig output).

First, load the bridge module into your kernel:

# kldload bridge


Tip

You should add this module to your kernel's startup process so that the bridging module is always available; add the following line to the /boot/loader.conf file:

bridge_load="YES"


Alternatively, add the following line to your kernel configuration and rebuild the kernel:

options BRIDGE



Next, issue the following commands (and add them to your /etc/sysctl.conf file):

# sysctl net.link.ether.bridge.enable=1 # sysctl net.link.ether.bridge.config="wi0 ed0" # sysctl net.inet.ip.forwarding=1


Be sure to replace ed0 with the device of your WAN-side interface (ppp0 if you're using a modem connection).

Finally, issue the following command to configure the wireless interface as an access point with a customized network name:

[View full width]

# ifconfig wi0 ssid MyNetwork channel 11 media DS/11Mbps mediaopt hostap up stationname "StationName"


Replace MyNetwork with the name of the wireless network you want to set up, and StationName with the name of the wireless base station. At this point you should be able to connect to the base station using any wireless client PC.

Additionally, you'll probably want to enable WEP encryption; WEP is a rudimentary privacy protocol that provides essentially no protection against determined hackers, but you'll want to enable it anyway. This is done using the following command:

[View full width]

# ifconfig wi0 inet up ssid MyNetwork wepmode on wepkey 0xmypassword media DS/11Mbps mediaopt hostap


Replace mypassword with a text pass phrase of your choice; this key will be required by any client wishing to connect to the MyNetwork network.

Be sure to add these configuration options to your /etc/rc.conf file, so that they're applied each time you boot your system. For example, the following /etc/rc.conf line will combine the preceding two configuration commands and apply it at each boot time:

[View full width]

ifconfig_wi0="inet up ssid MyNetwork channel 11 wepmode on wepkey 0xmypassword media DS/ 11Mbps mediaopt hostap stationname 'StationName'"





FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net