This file contains 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
#!/storage/xbin/bash | |
# This script should help forward VPN over any tethered connection on a Android device. Turn on tethering, then enable VPN, then run this script. | |
# Inital variable setup | |
tethering=0 | |
# Setup iptables before forwarding VPN | |
iptables -A POSTROUTING -o tun0 -j MASQUERADE -t nat |
This file contains 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
# /etc/udev/rules.d/70-huawei-e3.conf | |
# Necessary for network interface name | |
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0" | |
# Might be duplicate to usb_modeswitch config, however it's good to have it there | |
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf" |