[Android Q&A, Help & Troubleshooting] z300muser:
hi all

i try to share my vpn from android hotspot

i need some help with this script

iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61

than i execute it i can ping everything

ping 192.168.0.1 all machine under this adress ok. it's ok for (local)

ping 10.8.0.1 all machine under this adress ok. it's ok for (vpn)

ping 8..8.8.8 it's ok

ping url ( google.com ) it's ok too

all it's good but i can't acces internet (dns automatic or 8.8.8.8 not work. Both i can see some web page but really slower and not properly)

many time i loose but don't reach my goal, my brain is really hot now:silly:

can i have some help

my ip route and rule by defaut see me this (hotspot and openvpn work)

# ip route show
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.3
10.228.115.64/29 dev rmnet_data2 proto kernel scope link src 10.228.115.67
100.93.115.212/30 dev rmnet_data1 proto kernel scope link src 100.93.115.213
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.1

ip rule show
0: from all lookup local
10000: from all fwmark 0xc0000/0xd0000 lookup legacy_system
10500: from all iif lo oif dummy0 uidrange 0-0 lookup dummy0
10500: from all iif lo oif rmnet_data0 uidrange 0-0 lookup rmnet_data0
10500: from all iif lo oif rmnet_data1 uidrange 0-0 lookup rmnet_data1
10500: from all iif lo oif wlan0 uidrange 0-0 lookup local_network
10500: from all iif lo oif rmnet_data2 uidrange 0-0 lookup rmnet_data2
11000: from all iif tun0 lookup local_network
12000: from all fwmark 0x0/0x20000 iif lo uidrange 0-99999 lookup tun0
12000: from all fwmark 0x0/0x20000 iif lo uidrange 99900000-99999999 lookup tun0
12000: from all fwmark 0xc0066/0xcffff lookup tun0
13000: from all fwmark 0x10063/0x1ffff iif lo lookup local_network
13000: from all fwmark 0xd0001/0xdffff iif lo lookup rmnet_data0
13000: from all fwmark 0x10064/0x1ffff iif lo lookup rmnet_data1
13000: from all fwmark 0xd0065/0xdffff iif lo lookup rmnet_data2
13000: from all fwmark 0x10066/0x1ffff iif lo uidrange 0-99999 lookup tun0
13000: from all fwmark 0x10066/0x1ffff iif lo uidrange 99900000-99999999 lookup tun0
13000: from all fwmark 0x10066/0x1ffff iif lo uidrange 0-0 lookup tun0
14000: from all iif lo oif dummy0 lookup dummy0
14000: from all fwmark 0xc0000/0xc0000 iif lo oif rmnet_data0 lookup rmnet_data0
14000: from all iif lo oif rmnet_data1 lookup rmnet_data1
14000: from all iif lo oif wlan0 lookup local_network
14000: from all fwmark 0xc0000/0xc0000 iif lo oif rmnet_data2 lookup rmnet_data2
14000: from all iif lo oif tun0 uidrange 0-99999 lookup tun0
14000: from all iif lo oif tun0 uidrange 99900000-99999999 lookup tun0
15000: from all fwmark 0x0/0x10000 lookup legacy_system
16000: from all fwmark 0x0/0x10000 lookup legacy_network
17000: from all fwmark 0x0/0x10000 lookup local_network
18000: from all iif wlan0 lookup rmnet_data2
19000: from all fwmark 0x64/0x1ffff iif lo lookup rmnet_data1
21000: from all fwmark 0x66/0x1ffff lookup rmnet_data1
22000: from all fwmark 0x0/0xffff iif lo lookup rmnet_data1
32000: from all unreachable

thank's for help i think i don't need a lot for make it but alone i can't do it