Skip to content

Instantly share code, notes, and snippets.

@cjimti
Last active June 8, 2016 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjimti/af6eb1e41c2ec855136e7ffc3e22296a to your computer and use it in GitHub Desktop.
Save cjimti/af6eb1e41c2ec855136e7ffc3e22296a to your computer and use it in GitHub Desktop.
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
iw dev wlan0 interface add uap0 type __ap
service dnsmasq restart
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE
ifup uap0
hostapd /etc/hostapd/hostapd.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment