Okay, so note that this script is over 8 years old now but if you google some of the lines or ask in a Linux / Android board they may be able to help you get this working if it doesn’t as-is:
So, connect to your vpn on your phone and activate hotspot. Before connecting to it simply type these lines into the terminal (Think I used to use the Terminal Emulator app). You’ll have to run the “su” command first to get root access:
iptables --flush
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -A FORWARD -j ACCEPT
iptables -t nat -A POSTROUTING -j MASQUERADE
That should be all you need… Unless something’s changed in later android versions. I saved the above as a .sh script so I didn’t have to copy-paste every line every time
This is the reason I was forced to use android and root my phone. I used a custom ROM to bring back the tethering option then connect to a VPN and used the rooted terminal to mess with the iptables and routing to mask the fact I was tethering. Uuuugh, I don’t miss those days. Luckily the market changed in my country and went the other direction so I don’t have to deal with this anymore… Still have the old shell scripts saved tho ;)
Good solution but some network providers look for Windows / Mac exclusive traffic, headers or some-such shutting down your connection immediately. I had some success tethering Linux machines tho :P Modern Windows likes to phone-home imminently upon establishing an internet connection, not to mention windows updates and a whole host of windowsness. The anti-tether developers were no doubt spoilt for choice with the amount of flags windows sends!