create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap.git
Log | Files | Refs | LICENSE

commit c04f7f0bd8b22ea0b9662c4c71f74672003b0923
parent 503e715d4e01675c07a26f5c11fe6dcea4408ca8
Author: oblique <psyberbits@gmail.com>
Date:   Thu Aug 28 20:50:09 +0300

Redirect iptables output to /dev/null on cleanup

Diffstat:
create_ap | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/create_ap b/create_ap @@ -259,9 +259,9 @@ cleanup() { if [[ "$SHARE_METHOD" != "none" ]]; then if [[ "$SHARE_METHOD" == "nat" ]]; then - iptables -t nat -D POSTROUTING -o ${INTERNET_IFACE} -j MASQUERADE - iptables -D FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT - iptables -D FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT + iptables -t nat -D POSTROUTING -o ${INTERNET_IFACE} -j MASQUERADE > /dev/null 2>&1 + iptables -D FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT > /dev/null 2>&1 + iptables -D FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT > /dev/null 2>&1 [[ -n $OLD_IP_FORWARD ]] && echo $OLD_IP_FORWARD > /proc/sys/net/ipv4/ip_forward elif [[ "$SHARE_METHOD" == "bridge" ]]; then ip link set down $BRIDGE_IFACE @@ -271,9 +271,9 @@ cleanup() { fi if [[ "$SHARE_METHOD" != "bridge" ]]; then - iptables -D INPUT -p tcp -m tcp --dport 53 -j ACCEPT - iptables -D INPUT -p udp -m udp --dport 53 -j ACCEPT - iptables -D INPUT -p udp -m udp --dport 67 -j ACCEPT + iptables -D INPUT -p tcp -m tcp --dport 53 -j ACCEPT > /dev/null 2>&1 + iptables -D INPUT -p udp -m udp --dport 53 -j ACCEPT > /dev/null 2>&1 + iptables -D INPUT -p udp -m udp --dport 67 -j ACCEPT > /dev/null 2>&1 fi if [[ $NO_VIRT -eq 0 ]]; then