[Sipoonkorpi/Xperia X] App Internet connectivity fails after tethering
I have encountered issues with this; after enabling tethering over USB, all phone apps' Internet connnectivity gets really slow or inexistent.
Also an IMAP account stops syncing while gmail still sync.
I have a script to set up IP forwarding and iptables. Have tried flushing the rules and disabling forwarding, still does not return to normal.
Still, connection is good through USB.
Have tried setting flight mode several times, does not help. Only a reboot solves the problem.
Tried running my script in Terminal after a reboot without ever having a USB connection, immediately the same problem arises.
This is my "netshare" script:
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -F
/sbin/iptables -t nat -A POSTROUTING -o rmnet_data0 -j MASQUERADE
/sbin/iptables -A FORWARD -i rmnet_data0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i rndis0 -o rmnet_data0 -j ACCEPT