Skip to content

Instantly share code, notes, and snippets.

@joshspicer
Last active December 12, 2021 22:17
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 joshspicer/e0be7482bd316cb4043ebeaf2ce52c3a to your computer and use it in GitHub Desktop.
Save joshspicer/e0be7482bd316cb4043ebeaf2ce52c3a to your computer and use it in GitHub Desktop.
#!/bin/bash
airmon-ng check kill
airmon-ng start wlan1
ifconfig wlan1mon up 192.168.1.1 netmask 255.255.255.0
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface wlan1mon -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
# hostapd hostapd.conf
# dnsmasq -C dnsmasq.conf -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment