afwall icon indicating copy to clipboard operation
afwall copied to clipboard

LAN connections blocked after a while when AFWall in background very annoying

Open githubuser181226 opened this issue 2 years ago • 3 comments

Hi.

I've got this very annoying issue.

I use my phone as a document scanner only and rely heavily on having transparent LAN connection from and into the phone. I use Xyplorer and SMBSync2 to transfer data and the issue is that despite allowing LAN connections for ALL apps in AFWall+ (and denying internet for ALL) and also enabling the option to allow inbound LAN connections after a while (I don't know how long) when AFWall+ is working in the background it then starts to block my apps from accessing any other LAN host.

To fix this problem all I need to do (but I do it every single time, and many times a scanning session) is to open AFWall+ UI and then go back to the app and retry connecting (usually 1-2 times).

I can't add no logs, because AFWall+ crashes when I enable logging.

For the iptables rules they are simple: block internet for every single app/service, and enable LAN access for every single app/service Also as I said, I enabled "allow inbound LAN connections" in the options.

Running LineageOS 14.1 osprey on Motorola Gen3 (2015).

Please advise.

githubuser181226 avatar Dec 17 '22 08:12 githubuser181226

Hello again.

I have disabled battery optimization for AFWall+ and and re-checked, but alas, the issue persists.

After some short amount of time of me not doing anything with the phone, whenever I try to run any app requireing LAN connection, AFWall blocks it.

I have to then open AFWall UI, and then go back to the app, and retry and after 1, sometimes 2 attempts it regains LAN connectivity.

I don't know what to do anymore, and AFWall is the only firewall I can actually trust.

Can someone replicate my set up and confirm if it isn't just my device acting up?

Cheers.

githubuser181226 avatar Jan 06 '23 06:01 githubuser181226

Yes, happens to me too. I use my phone to control the smart tv. Both devices are on the same local network. Sometimes the phone can not connect to the tv. When this happens, reapplying the firewall rules will solve the problem.

1-eric avatar Feb 21 '23 23:02 1-eric

I do not know your specific cases, but if applying rules fails for any reason, such as the buggy parallelism in 3.5.3, then AFWall+ blocks almost everything. This is shown by toaster “Error applying iptables rules”

after one of those, you must see “Rules applied with success” or the firewall state is corrupt

resolutecake avatar Sep 11 '23 07:09 resolutecake