Created
November 9, 2013 05:37
-
-
Save The-Yoda/7382131 to your computer and use it in GitHub Desktop.
Creating hotspot in ubuntu 12.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/hostapd/hostapd.conf | |
interface=wlan1 | |
driver=nl80211 | |
ssid=hotspot | |
hw_mode=g | |
channel=1 | |
auth_algs=1 | |
ignore_broadcast_ssid=0 | |
wpa=3 | |
wpa_passphrase=12345678 | |
wpa_key_mgmt=WPA-PSK | |
wpa_pairwise=TKIP | |
rsn_pairwise=CCMP | |
/etc/dhcp/dhcpd.conf | |
comment everything except ddns-update-style and log-facility | |
subnet 10.10.0.0 netmask 255.255.255.0 { | |
range 10.10.0.2 10.10.0.16; | |
option domain-name-servers 8.8.4.4, 208.67.222.222; | |
option routers 10.10.0.1; | |
} | |
vim /etc/sysctl.conf | |
uncomment net.ipv4.ip_forward=1 | |
/etc/default/isc-dhcp-server | |
INTERFACES="wlan1" | |
Run: | |
sudo ifconfig wlan1 10.10.0.1 | |
sudo service isc-dhcp-server restart | |
sudo iptables -t nat -A POSTROUTING -s 10.10.0.0/16 -o ppp0 -j MASQUERADE | |
sudo hostapd -B /etc/hostapd/hostapd.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment