afwall
afwall copied to clipboard
Wi-Fi tethering: --match owner for Android Pie/9 on Google Pixel 2, incorrect uid
Android version 9, build taimen-pq2a.190305.002 (Google Pixel 2) dnsmasq running as UID 1052
Added the following custom script to match uid 1052: ` #!/system/bin/sh
IPTABLES=/system/bin/iptables IP6TABLES=/system/bin/ip6tables
$IPTABLES -I afwall-wifi-tether -p udp -m owner --uid-owner 1052 -m udp --sport 67 --dport 68 -j RETURN
$IPTABLES -I afwall-wifi-tether -p udp -m owner --uid-owner 1052 -m udp --sport 53 -j RETURN
$IPTABLES -I afwall-wifi-tether -p tcp -m owner --uid-owner 1052 -m tcp --sport 53 -j RETURN
$IP6TABLES -I afwall-wifi-tether -p udp -m owner --uid-owner 1052 -m udp --sport 67 --dport 68 -j RETURN
$IP6TABLES -I afwall-wifi-tether -p udp -m owner --uid-owner 1052 -m udp --sport 53 -j RETURN
$IP6TABLES -I afwall-wifi-tether -p tcp -m owner --uid-owner 1052 -m tcp --sport 53 -j RETURN
`
+1. Same issue for me (on andoird 9 / lineageos 16.1). Thanks for the iptables rules
Thank you! This solved my persistent tethering issue. I have Android 9, Lineage OS running on OnePlus One. Your iptables rules fixed the tethering issue!
I just spent two hours troubleshooting this to come to the same conclusion. I googled "android dnsmasq 1052" when I finally figured out what to do and this came up. I'm also on Lineage 16(Android 9/P).
My solution was:
iptables -I afwall-wifi-tether 1 -p udp -m owner --uid-owner 1052 -m udp --sport 53 -j RETURN
iptables -I afwall-wifi-tether 1 -p tcp -m owner --uid-owner 1052 -m tcp --sport 53 -j RETURN
You may also want to see https://github.com/ukanth/afwall/issues/964
This is a trivial fix. Suggest someone fork. AFW has seemed kinda dead for awhile now. This product is ripe for a replacement or takeover.
Just to confirm, the AFWALL tethering problem still exists on android 10 (One Plus 8 Pro). It is solved for me by BlessDeix92's version of the script (must add the #!/system/b)in/sh and iptables==/system/bin/iptables lines).
michaelbarrientos's version of the script caused an error - I did not debug further.