Skip to content

Instantly share code, notes, and snippets.

@Sydney-o9
Created July 21, 2017 08:24
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 Sydney-o9/14fe5ed01d1405e3e9dcd1ded7b330c1 to your computer and use it in GitHub Desktop.
Save Sydney-o9/14fe5ed01d1405e3e9dcd1ded7b330c1 to your computer and use it in GitHub Desktop.
hostapdstop.sh
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Stop hostapd
# service hostapd stop
/etc/init.d/hostapd stop
# Bring wlan1 interface down
# ifdown wlan1
# Disable IP Forwarding
sysctl net.ipv4.ip_forward=0
# Remove firewall rules for the Access Point
iptables -t nat -D POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE
# Remove virtual interface
iw dev wlan1 del
# Stop dnsmasq
# service dnsmasq stop
/etc/init.d/dnsmasq stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment