Jump to content

How can I get rid from IPv6?


Recommended Posts

Hi mates,
unfortunately I've lot of problems with IPv6, the programs I use love to use IPv6 to bind their TCP ports and not IPv4, I suppose this is not up to them but the kernel suggest/force them use it first. 
How can I get completely rid of IPv6? I want to kill it completely, it doesn't matter for me to enable it in future.
I've disabled using armbian-config and checked /etc/sysctl.conf, there are these lines:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

 

but thy don't have affect. Maybe this is a bug of armbian? I suppose so..
Thanks for support

Edited by Barabba
Link to comment
Share on other sites

  • Barabba changed the title to How can I get rid from IPv6?

don't think its armbian fault, networking comes from debian (and ubuntu)

 

there are a lot of guides on the internet suggesting you to modify sysctl.conf, but I read about problems, for instance if network manager is already managing your interfaces...

you can check discrepancies using: 

sudo sysctl --all | grep disable_ipv6

you might find something like this 

...
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
...

showing that IPv6 is not disabled on a specific interface...

 

the following guide provides some other options and add more on the sysctl.conf one (which I wouldn't recommend anyway)

https://pimylifeup.com/ubuntu-disable-ipv6/

 

but I'd still prefer to disable IPv6 on the single interface using network manager, as described here

disabling IPv6 for a specific connection

Edited by quackmore
Link to comment
Share on other sites

Thank you my friend, your answer is really precious.
Let me comment by order:

yes, "sudo sysctl --all | grep disable_ipv6" showed me the specific interfaces wlan0 and eth0 had IPv6 disabled=0, and this is really strange, cause I've checked  /etc/sysctl.conf and all is commented out except the 3 lines I worote, to disable IPv6. Where it get that "0" then? No sense, in my opinion this is a bug, and I believe so because use armbian-config and disable the IPv6 doesn't have that real effect.

 

Typing " sudo sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1" gave the result, but when I reboot the devices it forgot about it. So I put those 2 specific interface lines inside sysctl.conf, but it ignores it, it continues to have a 0, crazy. I'll read more your documentation, I still can't get rid of damn IPv6..

 

And here is painful point, even if I disabled it temporary, I run mpd and I see it doesn't bind the 6600 on IPv4, which is actually free, have a look please:

 

root@orangepizero:~# sysctl --all | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.wlan0.disable_ipv6 = 0
root@orangepizero:~# sudo sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1
net.ipv6.conf.wlan0.disable_ipv6 = 1
root@orangepizero:~# sudo sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6 = 1
root@orangepizero:~# sysctl --all | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.wlan0.disable_ipv6 = 1
root@orangepizero:~# mpd
Dec 05 00:46 : server_socket: bind to '[::1]:6600' failed (continuing anyway, because binding to '127.0.0.1:6600' succeeded): Failed to bind socket: Cannot assign requested address
Dec 05 00:46 : exception: Failed to bind to '0.0.0.0:6600'; Failed to bind socket: Address already in use
root@orangepizero:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1307/sshd: /usr/sbi
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      610/systemd-resolve
tcp6       0      0 :::22                   :::*                    LISTEN      1307/sshd: /usr/sbi
tcp6       0      0 :::111                  :::*                    LISTEN      1/init
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1105/avahi-daemon:
udp        0      0 0.0.0.0:34811           0.0.0.0:*                           1105/avahi-daemon:
udp        0      0 127.0.0.53:53           0.0.0.0:*                           610/systemd-resolve
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1319/chronyd
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/init
udp6       0      0 :::5353                 :::*                                1105/avahi-daemon:
udp6       0      0 :::56598                :::*                                1105/avahi-daemon:
udp6       0      0 ::1:323                 :::*                                1319/chronyd
udp6       0      0 :::111                  :::*                                1/init
root@orangepizero:~#

 

I really don't now how to bind that portm thank you for suggestions, I still experiment and loosing time on something in my opinion should work automatic :(

Link to comment
Share on other sites

Hi mates, thank you for your answers, I've tried also the second methid, there is nothing to do.. I can't bing mpd to port 6600 on IPv4. It keeps loving to bind it to IPv6, even if it is disabled. I really considering this version of kernel is bugged, as for example also the wlan0 interface changes MAC at every boot.
It is not normal an user get difficulties on this part, all should be automatic. I've lost some hours and this makes me a bit crazy.

If somebody can tell me how to destroy (yes, I want to destroy it) IPv6 then let's have a chance, I don't want it at all.

 

root@orangepizero:~# sysctl --all | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.wlan0.disable_ipv6 = 1
root@orangepizero:~# nmcli connection show
NAME                UUID                                  TYPE      DEVICE
baklazhan           b03dee75-6edf-4420-abca-90ee13cdca3c  wifi      wlan0
Armbian ethernet    65dbb918-f88a-4bce-94b4-b3fca126a343  ethernet  --
Armbian ethernet    e4009969-95ff-4a39-b609-914216e329b8  ethernet  --
Wired connection 1  05b999ba-a581-3e87-b315-747df8578472  ethernet  --
root@orangepizero:~# nmcli connection modify baklazhan ipv6.method "disabled"
root@orangepizero:~# nmcli connection up baklazhan
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3)
root@orangepizero:~# sysctl --all | grep disable_ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 0
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.wlan0.disable_ipv6 = 1
root@orangepizero:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      610/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1295/sshd: /usr/sbi
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp6       0      0 :::22                   :::*                    LISTEN      1295/sshd: /usr/sbi
tcp6       0      0 :::111                  :::*                    LISTEN      1/init
udp        0      0 127.0.0.53:53           0.0.0.0:*                           610/systemd-resolve
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1315/chronyd
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/init
udp        0      0 0.0.0.0:42356           0.0.0.0:*                           1106/avahi-daemon:
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1106/avahi-daemon:
udp6       0      0 :::49214                :::*                                1106/avahi-daemon:
udp6       0      0 ::1:323                 :::*                                1315/chronyd
udp6       0      0 :::111                  :::*                                1/init
udp6       0      0 :::5353                 :::*                                1106/avahi-daemon:
root@orangepizero:~# mpd
Dec 07 23:16 : server_socket: bind to '[::1]:6600' failed (continuing anyway, because binding to '127.0.0.1:6600' succeeded): Failed to bind socket: Cannot assign requested address
Dec 07 23:16 : exception: Failed to bind to '0.0.0.0:6600'; Failed to bind socket: Address already in use
root@orangepizero:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      610/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1295/sshd: /usr/sbi
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp6       0      0 :::22                   :::*                    LISTEN      1295/sshd: /usr/sbi
tcp6       0      0 :::111                  :::*                    LISTEN      1/init
udp        0      0 127.0.0.53:53           0.0.0.0:*                           610/systemd-resolve
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1315/chronyd
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/init
udp        0      0 0.0.0.0:42356           0.0.0.0:*                           1106/avahi-daemon:
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1106/avahi-daemon:
udp6       0      0 :::49214                :::*                                1106/avahi-daemon:
udp6       0      0 ::1:323                 :::*                                1315/chronyd
udp6       0      0 :::111                  :::*                                1/init
udp6       0      0 :::5353                 :::*                                1106/avahi-daemon:
root@orangepizero:~#

 

Edited by Barabba
Link to comment
Share on other sites

your logs say:

Dec 07 23:16 : server_socket: bind to '[::1]:6600' failed (continuing anyway, because binding to '127.0.0.1:6600' succeeded)...

it looks like binding to an IPv4 address actually works while binding to an IPv6 address fails but it's not a fatal event...

 

I'd rather check your mpd config, and maybe open a specific thread for that

 

 

if you still wanna try another way to disable IPv6, try googling "Using GRUB to disable IPv6 on Ubuntu"

 

 

Link to comment
Share on other sites

16 hours ago, quackmore said:

it looks like binding to an IPv4 address actually works while binding to an IPv6 address fails but it's not a fatal event...

 

I'd rather check your mpd config, mini militia and maybe open a specific thread for that

 

 

if you still wanna try another way to disable IPv6, try googling "Using GRUB to disable IPv6 on Ubuntu"

I think that's what I am also trying to say. :) thanks for the clarifications.

Edited by jamesedger
Link to comment
Share on other sites

On 12/8/2022 at 8:34 PM, quackmore said:

it looks like binding to an IPv4 address actually works while binding to an IPv6 address fails but it's not a fatal event...

 

I'd rather check your mpd config, and maybe open a specific thread for that

 

 

if you still wanna try another way to disable IPv6, try googling "Using GRUB to disable IPv6 on Ubuntu"

 

Hi, thanks for keep supporting me, sorry for delay on answer, I' really busy at work before the end of the year, few time to play with linux..
I've tried the method:

nmcli connection show
nmcli connection modify mywifiSSID ipv6.method "disabled"
nmcli connection up mywifiSSID
cat /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

and it doesn't produce effect, eve if IPv6 is displayed as disabled mpd and node keep using it, horrible.
I've tried your second sulution, following the instructions


 

Disabling IPv6 support (Permanently)

Disable ipv6 built-in kernel module.

1. Edit /etc/default/grub and append ipv6.disable=1 to GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT like the following sample:

FROM:

GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX=""

TO:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1" GRUB_CMDLINE_LINUX="ipv6.disable=1"

I had no gub file into /etc/default, so I?ve created one and filled it, saved and rebbot, the same problem.
as I wrote, I also have
 

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.wlan0.disable_ipv6 = 1

Without any success.
The problem is not the IPv6 address, is the kernel how is built.. I suppose (!) it keeps using it, whatever. Also node JS uses it, it's not a problem of mpd.
There is any way to erase the IPV6 support files? Any way to get completely rid of it? I'ts amazing how much it disturbs, I really don't understand how nobody noticed yet these problems, nobody use in thery LAN IPv6 but linux pretend to use it at first, amazing.

You can see here how nodejs connect to mpd using the f* IPV6 and use it also for being listening for connections :#

 

root@orangepizero:~/cyp# node .
no passwords.json found
1671476385739 ws2mpd attached to a http server { address: '::', family: 'IPv6', port: 8080 }
root@orangepizero:~# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1293/sshd: /usr/sbi
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      610/systemd-resolve
tcp6       0      0 :::22                   :::*                    LISTEN      1293/sshd: /usr/sbi
tcp6       0      0 :::111                  :::*                    LISTEN      1/init
tcp6       0      0 :::8080                 :::*                    LISTEN      1782/node
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1107/avahi-daemon:
udp        0      0 127.0.0.53:53           0.0.0.0:*                           610/systemd-resolve
udp        0      0 127.0.0.1:323           0.0.0.0:*                           1309/chronyd
udp        0      0 0.0.0.0:41555           0.0.0.0:*                           1107/avahi-daemon:
udp        0      0 0.0.0.0:111             0.0.0.0:*                           1/init
udp6       0      0 :::5353                 :::*                                1107/avahi-daemon:
udp6       0      0 :::41003                :::*                                1107/avahi-daemon:
udp6       0      0 ::1:323                 :::*                                1309/chronyd
udp6       0      0 :::111                  :::*                                1/init

 

Edited by Barabba
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines