Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Internet after switching connection type (wifi - > mobile and around) #852

Closed
Friday13th87 opened this issue Aug 19, 2018 · 7 comments
Closed

Comments

@Friday13th87
Copy link

I am using afwall donate on my Mi8, running Miui 10 under Android 8.1 rooted with Magisk 16.0 stable. Init.d is working and fix boot data leak is working as well (I think so - made the test with 00test)
For logging I am using Busybox.

Afwall+ is not working great at this time.
If I am switching from wifi to mobile data (or the way around) everything is blocked and I need to reboot my phone, than it is working. By applying the rules by hand (even turning firewall off and on again) there is still no connection.

I don't know if I should write it here - the logs are stopping all the time, I need to turn logs off and on for having logs again.

And one side question: by choosing to apply the rules after a certain amount of time after start, within this time everything is blocked, right? I didn't find any description for this feature

IPv4rules.log

@Friday13th87
Copy link
Author

Friday13th87 commented Aug 23, 2018

I tried out a lot.
i tried different ROMs, used startup delay, tried with startup leak and without, made afwall+ to a system app, tried it with magisk 16.0 16.4 and 16.7, used system iptables and integrated iptables. tried to kill afwall, cleard cache and restarted it after switching the connection type.

nothing worked, i still need to restart my phone to get an internet connection after leaving wifi, entering wifi, switching from LTE to 3G, EDGE etc.

any ideas?

EDIT:
Some other details: i downloaded afwall+ from fdroid with my pc and installed it through a filemanager on my phone, after settingup everything i installed the donation key from google play store.

@Friday13th87
Copy link
Author

Friday13th87 commented Sep 5, 2018

Today I gave it another try and found out that the iptables flushing in my custom script is responsible for the behavior.
as in the custom script section mentioned I wrote in my script

$IPTABLES -F INPUT $IPTABLES -F FORWARD $IPTABLES -t nat -F $IPTABLES -t mangle -F $IP6TABLES -F INPUT $IP6TABLES -F FORWARD $IP6TABLES -t nat -F $IP6TABLES -t mangle -F

How can this happen?

@Friday13th87
Copy link
Author

probably here is not the place for an answer or for help.
if i look at all the other issues and the responses, the so called "developer" is giving a sh** about it

@ukanth
Copy link
Owner

ukanth commented Sep 7, 2018

Read the bug submission rules. I can't help without looking at what's happening with iptables. Kindly post the iptables rules ( from menu -> Show rules -> export or send error report ) and attach it here. I will look into it.

@ukanth ukanth added the Review label Sep 7, 2018
@Friday13th87
Copy link
Author

I posted my rules in the first post.

@shellshocker
Copy link

shellshocker commented Sep 23, 2018

I can confirm this.
Using Xiaomi Mi6 with LineageOS 15.1 (Android 8.1) - latest nightly.

Same problem here. After commenting these lines, it's working:

# Flush/Purge all rules except OUTPUT
$IPTABLES -F INPUT
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
$IP6TABLES -F INPUT
$IP6TABLES -F FORWARD
$IP6TABLES -t nat -F
$IP6TABLES -t mangle -F

But then I'm facing OS restarts. 👎

I also have to remove these:

# Flush/Purge all chains  
$IPTABLES -X   
$IPTABLES -t nat -X  
$IPTABLES -t mangle -X  
$IP6TABLES -X   
$IP6TABLES -t nat -X  
$IP6TABLES -t mangle -X

After that it's working fine.

@ukanth ukanth closed this as completed Dec 19, 2018
@ukanth ukanth removed the Review label Mar 7, 2021
@MidyatMaster
Copy link

Try to premit access to the application called " (root) Application as root"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants