afwall icon indicating copy to clipboard operation
afwall copied to clipboard

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

Open liamolua opened this issue 7 years ago • 6 comments

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

liamolua avatar Mar 16 '19 01:03 liamolua

1:1 same here

luukatyuo avatar Aug 29 '19 20:08 luukatyuo

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

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

wwwdesign avatar Dec 19 '19 16:12 wwwdesign

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.

RowlandOti avatar Feb 23 '20 06:02 RowlandOti

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

wibrt avatar Apr 13 '20 13:04 wibrt

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

selurvedu avatar Jun 18 '20 01:06 selurvedu