Sample Header Ad - 728x90

Allow only LAN access for WiFi and route rest via mobile data

0 votes
0 answers
68 views
I have a rooted device, and I want to use the internet via mobile data and let the LAN access via WiFi, but when the WiFi is connected, the gateway changes to WiFi. I have read similar answers like this which uses iptables, but I couldn’t get it working — likely due to my limited experience with iptables. Some suggested using AFWall+ and NetGuard, but that too didn't work. Now, I have managed to set up IPv4 access (i.e., I could access any IPv4 sites), and local access is also set, but only IPv6 is a problem now. I could ping IPv6 addresses, but for example, if I visit facebook.com, it wouldn't work. While modifying the hosts file to 2a03:2880:f184:186:face:b00c:0:25de www.facebook.com works, I need it to be done automatically by the default DNS server Would really appreciate it if someone could help me with it.
Asked by amgine (1 rep)
Apr 30, 2025, 08:43 AM
Last activity: May 2, 2025, 04:34 PM