This is a work in progress, and I have absolutely no idea how this is going to look on the web. It was inspired by all of the recent Undeadly posts I have been reading lately.
This is how I set up a basic wireless access point using OpenBSD 4.8. I admit some things could be done a _lot_ better, but I promise to update this post as I learn.
If you see a pound sign (#) at the beginning of a line, that means you must be root to execute the command. If you are editing a file and see a (#) that means that it is a configuration comment.
1: You will need to have OpenBSD 4.8 installed on a computer. I like using old laptops. Try to find one with an ethernet port and a supported wireless card or a usb port. I am currently using an old Dell C400 with a usb rum wireless card.
2: Enable IP forwarding. Using a text editor like vi edit your sysctl.conf file.
# vi /etc/sysctl.conf
Remove the '#' from in front of net.inet.ip.forwarding=1. This will enable ip forwarding.
3: Enable PF in pf.conf to use Network Address Translation.
# vi /etc/pf.conf
Add the following lines:
# Set network interfaces
# Replace vr and rum with your network interfaces.
ext_if=vr0 #internet
int_if=rum0 #LAN
pass out on $ext_if from !($ext_if) to any nat-to ($ext_if)
4: Update dhcpd.conf, so that we can dole out ip addresses.
# vi /etc/dhcpd.conf
replace the line in dhcpd.conf adding 192.168.1.1 as your DNS
option domain-name-servers 192.168.1.1, 8.8.8.8;
5: Enable DNS and DHCP in rc.conf.local
# vi /etc/rc.conf.local
Add the following lines:
# replace rum with your internal interface. Not the interface facing the internet.
named_flags="" # this enables DNS
dhcpd_flags="rum0" # this enables DHCP
6: Configure network interfaces. The first one might even be set up for you during the install. In my example vr0 is the network interface that is going to be facing the internet.
#vi /etc/hostname.vr0
Add the line:
dhcp NONE NONE NONE
Rum0 is the network interface that I will be connecting to with my wireless devices. It is my LAN interface.
#vi /etc/hostname.rum0
Add the following lines:
inet 192.168.1.1 255.255.255.0 NONE media autoselect mediaopt hostap
nwid my_net
wpa wpapsk $(wpa-psk my_net "your-password-here")
chan 11
7: Reset your computer using
# shutdown -r -p now
When your computer reboots, it should now start up DNS, DHCP, PF, and configure your network interfaces. Go ahead and connect to your new wireless access point.
I will do my best to answer any questions posted.
This is how I set up a basic wireless access point using OpenBSD 4.8. I admit some things could be done a _lot_ better, but I promise to update this post as I learn.
If you see a pound sign (#) at the beginning of a line, that means you must be root to execute the command. If you are editing a file and see a (#) that means that it is a configuration comment.
1: You will need to have OpenBSD 4.8 installed on a computer. I like using old laptops. Try to find one with an ethernet port and a supported wireless card or a usb port. I am currently using an old Dell C400 with a usb rum wireless card.
2: Enable IP forwarding. Using a text editor like vi edit your sysctl.conf file.
# vi /etc/sysctl.conf
Remove the '#' from in front of net.inet.ip.forwarding=1. This will enable ip forwarding.
3: Enable PF in pf.conf to use Network Address Translation.
# vi /etc/pf.conf
Add the following lines:
# Set network interfaces
# Replace vr and rum with your network interfaces.
ext_if=vr0 #internet
int_if=rum0 #LAN
pass out on $ext_if from !($ext_if) to any nat-to ($ext_if)
4: Update dhcpd.conf, so that we can dole out ip addresses.
# vi /etc/dhcpd.conf
replace the line in dhcpd.conf adding 192.168.1.1 as your DNS
option domain-name-servers 192.168.1.1, 8.8.8.8;
5: Enable DNS and DHCP in rc.conf.local
# vi /etc/rc.conf.local
Add the following lines:
# replace rum with your internal interface. Not the interface facing the internet.
named_flags="" # this enables DNS
dhcpd_flags="rum0" # this enables DHCP
6: Configure network interfaces. The first one might even be set up for you during the install. In my example vr0 is the network interface that is going to be facing the internet.
#vi /etc/hostname.vr0
Add the line:
dhcp NONE NONE NONE
Rum0 is the network interface that I will be connecting to with my wireless devices. It is my LAN interface.
#vi /etc/hostname.rum0
Add the following lines:
inet 192.168.1.1 255.255.255.0 NONE media autoselect mediaopt hostap
nwid my_net
wpa wpapsk $(wpa-psk my_net "your-password-here")
chan 11
7: Reset your computer using
# shutdown -r -p now
When your computer reboots, it should now start up DNS, DHCP, PF, and configure your network interfaces. Go ahead and connect to your new wireless access point.
I will do my best to answer any questions posted.