Author Topic: Disabling IPv6 in Sailfish OS?  (Read 4180 times)

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Disabling IPv6 in Sailfish OS?
« on: August 18, 2018, 05:15:28 pm »
More fun: Thought I'd at least get ProtonVPN working on the gadget and found a very nice little set of scripts on OpenRepos to do it. All went well right until the end when during connect the connection failed because IPv6 is available. I need to make it unavailable. Is there a quick and easy way to force IPv4 and nuke IPv6?

UPDATE: I found the answer, and in case it's of use to anyone else, here it is:

Disable IPv6 using the following commands:

Code: [Select]
devel-su sysctl -w
net.ipv6.conf.default.disable_ipv6=1
devel-su sysctl -w
net.ipv6.conf.default.disable_ipv6=1

Add following lines:

Code: [Select]
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
to the IPv6 settings file: devel-su vim /etc/sysctl.d/ipv6-settings.conf

(This from: https://together.jolla.com/question/163103/...on-sailfish-os/ )
« Last Edit: August 18, 2018, 06:20:03 pm by depscribe »
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #1 on: August 19, 2018, 11:41:27 am »
I'm surprised you needed to disable IPv6, in general, things should work just fine with it on.
Do you know what the problem was?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #2 on: August 19, 2018, 05:33:51 pm »
Quote from: speculatrix
I'm surprised you needed to disable IPv6, in general, things should work just fine with it on.
Do you know what the problem was?
Proton people believe that there is an address leak in IPv6 and won't allow installation if IPv6 is functioning.

https://protonvpn.com/support/prevent-ipv6-vpn-leaks/

https://together.jolla.com/question/163103/...on-sailfish-os/
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #3 on: August 19, 2018, 09:17:23 pm »
Another thing to try (google first) is to blacklist the ipv6 module. This is what I normally do for my other linux systems. Before somebody says "you shouldn't disable IPV6", there are definitely some network setups in which IPV6 doesn't play nicely. Some legacy servers/devices won't play well, and if IPV6 gets the first byte (couldn't resist) of the cherry, it will fail, and timeout eventually. To save this delay, you could fix the legacy device, or just disable IPV6. Time is money, so everyone here disabled IPV6

Going through the sys system is another way - and works just as well. The only difference is that blacklisting stops IPV6 from even starting. You can check which interfaces IPV6 is running on with:

cat /proc/net/if_inet6

Sorry, didn't see this thread on the weekend, I was away.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #4 on: August 19, 2018, 10:51:58 pm »
Quote from: depscribe
Proton people believe that there is an address leak in IPv6 and won't allow installation if IPv6 is functioning.

Ah, thanks for the clarification.

As a network administrator who's deployed ipv6, in the workplace and at home, I think it's an important skill and worth learning to use and troubleshoot.. good on the CV.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #5 on: August 20, 2018, 12:16:58 pm »
Quote from: vader
Another thing to try (google first) is to blacklist the ipv6 module. This is what I normally do for my other linux systems. Before somebody says "you shouldn't disable IPV6", there are definitely some network setups in which IPV6 doesn't play nicely. Some legacy servers/devices won't play well, and if IPV6 gets the first byte (couldn't resist) of the cherry, it will fail, and timeout eventually. To save this delay, you could fix the legacy device, or just disable IPV6. Time is money, so everyone here disabled IPV6
I'm probably missing something obvious, but the structure of Sailfish is such that I can't find where to blacklist it. If there's an /etc/modprobe.d directory, I can't find it.

Blacklisting does seem the most elegant way of doing it, because it can be readily undone. But damned if I can figure out how. Though I just realized that I haven't blacklisted anything since systemd.

Recipe?
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Disabling IPv6 in Sailfish OS?
« Reply #6 on: August 20, 2018, 07:23:31 pm »
Quote from: depscribe
I'm probably missing something obvious, but the structure of Sailfish is such that I can't find where to blacklist it. If there's an /etc/modprobe.d directory, I can't find it.

Blacklisting does seem the most elegant way of doing it, because it can be readily undone. But damned if I can figure out how. Though I just realized that I haven't blacklisted anything since systemd.

Recipe?

I checked on mine and I have /etc/modprobe.d with a few files in it. There is even a blacklist. It seems as though all drivers are compiled into the kernel, but you could still try to create something like:

/etc/modprobe.d/blacklist.local

with contents:

blacklist ipv6