Created
July 21, 2017 08:24
-
-
Save Sydney-o9/14fe5ed01d1405e3e9dcd1ded7b330c1 to your computer and use it in GitHub Desktop.
hostapdstop.sh
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 | |
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