Afwall: Computer won't connect to Hotspot or USB Tether with AFWall Connected

Created on 16 Mar 2019  路  5Comments  路  Source: ukanth/afwall

Hey, my computer refuses to connect to my phone via wifi hotspot or usb tether when I have AFWall turned on, it just hangs then eventually gives up. If I disable _which is a security threat_ it will work again.

I have whitelisted (tethering) - DHCP+DNS services but to no prevail.

How can I get around this?
Device: Nexus 6P
Firmware: Lineage OS (Android 8.1)
Kernel Version: 3.10 108-FrancoKernel

Most helpful comment

Faced this issue, and was wondering, why can't we have a setting that applies this rules whenever we want? Not everyone is a genius at iptables manipulation. Even copy-pasting into the custom script section results in errors, because not every phone will be the same.

All 5 comments

1:1 same here

The threadopener refers to Oreo, so maybe it's a different issue...

edit: Oh, and the thread is from august. Nevermind.

Faced this issue, and was wondering, why can't we have a setting that applies this rules whenever we want? Not everyone is a genius at iptables manipulation. Even copy-pasting into the custom script section results in errors, because not every phone will be the same.

I explained it minimum 10 times here in the AFWall+ issue ticker.

* Android Pie+ does not redirect hotspot traffic through VPN network

* Android Pie does not redirect correct iptables for port 53 due to several reasons
iptables -t mangle -I PREROUTING -i wlan0 -p udp --dport 53 -j MARK --set-mark 2
ip rule add fwmark 2 lookup 5000
ip route add default dev tun0 table 5000
iptables -I FORWARD -o wlan0 -i tun0 -j ACCEPT
iptables -I FORWARD -i wlan0 -o tun0 -j ACCEPT

That's what only fixes it and you need to change it according to your port/interface. This way a "VPN" tunnel iptables "tunnel" will persist otherwise Android itself will try to change it all the time, this has something to do to avoid data leakage in case someone manages the Android internal firewall via GUI.

Hth:
It is also a problem on FP2, android 7. Usb tethering does not work with afwall enabled.

Where/how do you enter the iptables rules in afwall?, so that i can test it

The solution in #965 fixed WiFi tethering on my Android Pie phone. Bluetooth tethering was working fine while hotspot wasn't.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gitoffthelawn picture Gitoffthelawn  路  4Comments

belevtsoff picture belevtsoff  路  3Comments

0pLuS0 picture 0pLuS0  路  8Comments

Gitoffthelawn picture Gitoffthelawn  路  7Comments

n90p picture n90p  路  6Comments