rules fail to apply and device reboots on network connectivity change
any sort of network change; disabling/enabling data, mobile connecting to different tower etc often causes the phone to soft reboot (doesnt start from the logo screen) This happens irrespective of the rules applied and almost always when mobile data is enabled (after disabling it)
- Device: Motorola
- Android OS: RROS 8.6.3 and 7.xx (Based on LOS 15 and 16)
Module enabled in edexposed, logging disabled,startup script disabled (tho changing it makes no difference)
By the looks of it i think it is a kernel crash (im not sure about this fact sorry im a noob) bcoz i see the the screen displays the last thing on it for less than a second before rebooting. At times device will start from reboot, afwall applies its rules and fails and the same cycle starts. This cycle sometimes ends when i delete the rules disable firewall rules and reapply them. IPv4rules.log Managed to get this just before it was about to reboot
disabling ipv6 support stops the reboots but doesn't stop it from failing to apply rules. can someone tell me what this might mean, does disabling ipv6 have any disadvantages? Is there a better way to fix this?
I'm having this trouble (soft reboot on connectivity change) as well. My phone is a OnePlus 5T running the latest Lineage 17.1, and disabling AFwall+ makes the problem go away.
I'm not using Xposed, but I do have the phone rooted with Magisk.
Same issue here after upgrading to Android 11 on Samsung S10
Thanks for the logs, seems like kernel does not support iptables filters and some other firewall is interfering with AFWall+ Others, please send the logcat to see the problem much deeper.
Hi, i'm having the same issue on a mpst recent kernel. Info:
- Oneplus 6t
- Android 11 aosp based rom (KangOs)
- Tried both stock kernel and MCD kernel (r1 and r2)
Issue appears as soon as i update kernel, at the moment i'm using an old version of MCD kernel (december)
Attached you will find log + screenshots of my actual setup.
The issue persists even if:
- selecting "allow selected" or "block selected"
- using iptables auto, system or inbuilt
- using busybox binary system or inbuilt
Thanks! screenshots.zip afwall.txt
Thanks. I will add support for iptables-legacy. Seems like new version of iptables does not support few options.
Can you confirm this path exists ?
/usr/sbin/iptables-legacy /usr/sbin/ip6tables-legacy
No, seems not:
root@fajita:/ # touch /usr/sbin/iptables-legacy
touch: '/usr/sbin/iptables-legacy': No such file or directory
root@fajita:/ # touch /usr/sbin/ip6tables-legacy
touch: '/usr/sbin/ip6tables-legacy': No such file or directory
you can see it here:
root@fajita:/ # ls -alh | grep usr
root@fajita:/ #
Have you tried using iptables as inbuilt and reapply rules ?
Yeah, the issue persists in every possible combination:
- inbuilt busybox and inbuilt iptables
- system busybox and inbuilt iptables
- system busybox and system iptables
- inbuilt busybox and system iptables
Let me know if i can help further :)
can you switch to system busybox and system iptables and apply rules and export the rules ?
Done
I could not export rules since i received "export failed" (you can check it in "export_failed" screenshot)
Also, i took log1.txt (log right after changing to sys iptables and sys busybox and apply) and log2.txt (taken after export failed); they could be abit messy though, i was forced to send them over via telegram since it couldn't export them in phone memory (just like export failed)
Seems it is an issue on the "owner" of UID to me
the ip_tables_matches on older kernel realease (which is working) has the following conf:
root@fajita:/ # cat /proc/net/ip_tables_matches
u32
time
string
statistic
state
quota
pkttype
owner
mac
limit
helper
conntrack
conntrack
conntrack
connlimit
comment
bpf
bpf
connmark
mark
rpfilter
ah
icmp
socket
socket
socket
socket
quota2
policy
multiport
length
iprange
ttl
hashlimit
hashlimit
esp
ecn
tos
dscp
udplite
udp
tcp
root@fajita:/ # cat /proc/net/ip_tables_matches | grep owner
owner
where the new file with a newer kernel release does not have owner match:
root@fajita:/ # cat /proc/net/ip_tables_matches
u32
time
string
statistic
state
quota
pkttype
mac
limit
helper
conntrack
conntrack
conntrack
connlimit
comment
bpf
bpf
connmark
mark
rpfilter
ah
icmp
socket
socket
socket
socket
quota2
policy
multiport
length
iprange
ttl
hashlimit
hashlimit
esp
ecn
tos
dscp
udplite
udp
tcp
root@fajita:/ # cat /proc/net/ip_tables_matches | grep owner
root@fajita:/ #
@urgali Hello, i think i have solved this, at least for our kernel. I compared the old and new branch defconfig and found that CONFIG_NETFILTER_XT_MATCH_OWNER was not set. Flipped it to yes, compiled and flashed, now afwall doesn't throw out any error. Sorry everyone for going slightly off topic.
I can confirm this was the issue, compiling the kernel with the flag make everyhting work.
Only issue remaining seems i'm not able to export afwall backup: EXPORT FAILED open failed: EPERM (operation not permitted)
Solved with latest beta pre-beta build :D
We can mark this issue as Solved!
