Skip to content
Roberto edited this page Feb 13, 2014 · 14 revisions

Setup

Prerequisites: a wi-fi adapter supporting "AP" (access point, or master) mode, such as Ralink RT5370.

hostapd (Access Point manager)

Execute:

sudo apt-get install hostapd

edit the file:

sudo nano /etc/network/interfaces

as follows:

auto lo

iface lo inet loopback

iface eth0 inet dhcp

#allow-hotplug wlan0

#iface wlan0 inet manual

#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

#iface default inet dhcp

iface wlan0 inet static

address 10.0.0.1

netmask 255.255.255.0

edit the file:

sudo nano /etc/hostapd/hostapd.conf

as follows:

interface=wlan0

driver=nl80211

ctrl_interface=/var/run/hostapd

ctrl_interface_group=0

ssid=coderbot

hw_mode=g

channel=8

wpa=2

wpa_passphrase=coderbot

wpa_key_mgmt=WPA-PSK

wpa_pairwise=CCMP

rsn_pairwise=CCMP

beacon_int=100

auth_algs=3

wmm_enabled=1

dnsmasq (DHCP and DNS server) Execute:

sudo apt-get install dnsmasq

Edit the file: sudo nano /etc/dnsmasq.conf

as follow:

interface=wlan0 # To get dnsmasq to listen only on wlan0.

dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h # This sets the available range from 10.0.0.2 to 10.0.0.5

dhcp-authoritative

Clone this wiki locally