Created
February 3, 2014 19:58
-
-
Save firatkucuk/8791221 to your computer and use it in GitHub Desktop.
Start hotspot shell script
This file contains hidden or 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
#!/bin/bash | |
# Configure IP address for WLAN | |
sudo ifconfig wlan0 192.168.150.1 | |
# Start DHCP/DNS server | |
sudo service dnsmasq restart | |
# Enable routing | |
sudo sysctl net.ipv4.ip_forward=1 | |
# Enable NAT | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
# Run access point server in daemon mode | |
sudo hostapd -B /etc/hostapd.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment