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)?

4
  • 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
    Commented Apr 2, 2022 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
    Commented Apr 3, 2022 at 3: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
    Commented Apr 3, 2022 at 4: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
    Commented Apr 3, 2022 at 9:27

0

You must log in to answer this question.

Browse other questions tagged .