Professional Documents
Culture Documents
Nat Fixer
Nat Fixer
Version 2
mount -o remount,rw /system /system
echo "#!/bin/sh" > /system/bin/fix
echo "sleep 30" >> /system/bin/fix
echo "iptables -F" >> /system/bin/fix
echo "ebtables -F" >> /system/bin/fix
echo "iptables -P INPUT ACCEPT" >> /system/bin/fix
echo "iptables -P FORWARD ACCEPT" >> /system/bin/fix
echo "iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADE" >>
/system/bin/fix
echo "iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE" >> /system/bin/fix
echo "iptables -I INPUT -i br0 -j ACCEPT" >> /system/bin/fix
echo "ebtables -t nat -D PREROUTING -p IPv4 --logical-in br0 --mark 0x0/0xff000000
-j mark --mark-or 0x10000000 --mark-target ACCEPT" >> /system/bin/fix
echo "atc AT+CFUN=0 > /dev/null 2>&1" >> /system/bin/fix
echo "atc AT+CFUN=1 > /dev/null 2>&1" >> /system/bin/fix
chmod 755 /system/bin/fix
echo /system/bin/fix >> /system/etc/autorun.sh
atc AT^RESET > /dev/null 2>&1