1

Android 10.

Trying to disable ipv6 (yes, I know the second line below appears redundant).

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

The values stay as long as I have wifi turned off:

# cat /proc/sys/net/ipv6/conf/wlan0/disable_ipv6 
1

But as soon as I turn wifi on, something changes (only) the wlan0 value back to 0:

# cat /proc/sys/net/ipv6/conf/wlan0/disable_ipv6 
0

If I change it back to 1 again, it gets changed back to 0 within a few seconds (and in Settings / About phone, I can actually see the ipv6 addresses return). Does anyone know what causes this (and how I can prevent it)?

confused
  • 31
  • 2
  • I don't think that's the right way. you are trying to change on linux, but you forgot android. probably it's set by apn/wifi settings app – alecxs Apr 02 '22 at 15:33
  • Results from searches for how to disab/e ipv6 for wireless networking in android all note that doing so requires root, and suggest the method above. – confused Apr 03 '22 at 03:27
  • messing with runtime linux kernel parameters doesn't make sense to me on android. anyway that would be temporary only. I could only image some build.prop tweaks might work (can be done from Magisk). but the proper way is imho from android framework side. kindly wait for better qualified response – alecxs Apr 03 '22 at 04:07
  • Android uses the linux kernel sources (built with the ANDROID flag). Applications exist (and I have one) to apply kernel parameter changes on every reboot. The "android framework" link you provided (every VPN has a similar page) applies only to mobile data, and has no relevance whatsoever to wifi. – confused Apr 03 '22 at 09:27

0 Answers0