0.0
Install "iw" and hostapd" from the repository if you dont have them.
1.0 open the terminal and run "iw list" and look at the supported interface modes. Mine look like this:
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
You have to have "AP" on the above list for this to work
1.5
Make sure the computer that is to act as a wireless access point can go online
2.0
Open "/etc/hostapd/hostapd.conf" text file with root's privileges and make the following changes
2.1
Set "interface" to the wireless interface to be used to broadcast wireless signals, the access point interface.
I have "interface=wlan1" this since my wireless network is "wlan1"
2.2
Set driver to "driver=nl80211"
2.3
Set essid to a string you want the wireless network to be seen with. I use "pinguins"
The above will give you a basic unsecured wireless access point. The config file is pretty detailed and easy to follow. You can
change different values to customize it to your liking.
After that,
open the terminal and type this command to start up hostapd
/usr/sbin/hostapd /etc/hostapd/hostapd.conf
The command will hang and you should see something like this if all is well and a wireless access point should now be visible over the air.
Configuration file: hostapd.conf
Using interface wlan1 with hwaddr 00:0d:0b:cf:f1:13 and ssid 'pinguins'
2.4
Make sure your computer allows packets to follow across different interfaces by running this command'
echo 1 > /proc/sys/net/ipv4/ip_forward
Forwarded packets from computers connected to the access point must be hidden before they are sent to the ISP on their way to the open web.Run the following command to "hide" them
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
where eth0 is the interface connected to the internet.
2.5
Give the wireless interface a static IP address with something like this. This address will be the default gateway address of computers connecting
to the access point.
ifconfig wlan1 192.168.10.10 netmask 255.255.255.0
2.6
Go to the computer you want to access the internet with through the access point and give its network interface the following properties
ip address: 192.168.10.20
network mask: 255.255.255.0
default gateway: 192.168.10.10
dns server: 8.8.8.8 (or whatever you prefer, that's google's servers)
2.7
Connect to the wireless network and you should be able to go online now
2.8
hostapdYou should produce something like this when a computer connects to the access point
wlan1: STA 00:22:3f:de:83:03 IEEE 802.11: authenticated
wlan1: STA 00:22:3f:de:83:03 IEEE 802.11: associated (aid 1)
AP-STA-CONNECTED 00:22:3f:de:83:03
wlan1: STA 00:22:3f:de:83:03 RADIUS: starting accounting session 4DE5F6F6-00000000