IPv6 affords a a lot bigger addressing scheme than IPv4, which is among the many causes it was developed. Nevertheless, I’ve seen uncommon instances the place IPv6 brought on community issues.
Since some {hardware} doesn’t make the most of IPv6 (and a few directors may go with IPv4), a short lived and straightforward answer is to disable IPv6. The protocol might be re-enabled when the issue is completely resolved.
You probably have {hardware} that implements IPv6 completely and software program that makes use of it accurately, this can be a non-issue. However if in case you have community issues with Linux servers or computer systems, and you’ve got exhausted all potential areas, you’ll be able to attempt disabling v6 of the community protocol.
I’ve had a couple of instances the place communication between a Linux desktop and an outdated router would continuously drop, and disabling IPv6 was the one answer that labored. After some time I might re-enable IPv6 to see if a router firmware replace (and a PC OS replace) mounted the issue. In some instances this solved the issue, and IPv6 might stay enabled, though in different instances IPv6 should be disabled once more.
I’ll present you find out how to disable IPv6 on a Linux machine. (Notice: I like to recommend disabling IPv6 solely if you’ve exhausted all different choices. You also needs to contemplate this a short lived answer.)
SEE: Prime Instructions Linux Admins Ought to Know (TechRepublic Premium)
Command line
You guessed it: We will work with the command line. I’ll present you find out how to disable IPv6 on Purple Hat and Debian primarily based distributions.
This is find out how to disable the protocol on a Purple Hat-based system:
- Open a terminal window.
- Change to the basis consumer.
- Concern the command sysctl -w internet.ipv6.conf.all.disable_ipv6=1
- Concern the command sysctl -w internet.ipv6.conf.default.disable_ipv6=1
To re-enable IPv6, challenge the next instructions:
sysctl -w internet.ipv6.conf.all.disable_ipv6=0
sysctl -w internet.ipv6.conf.default.disable_ipv6=0
This is find out how to disable the protocol on a Debian-based machine.
- Open a terminal window.
- Concern the command sudo nano /and so on/sysctl.conf
- Add the next to the underside of the file:
internet.ipv6.conf.all.disable_ipv6 = 1
internet.ipv6.conf.default.disable_ipv6 = 1
internet.ipv6.conf.lo.disable_ipv6 = 1
- Save and shut the file.
- Reboot the machine.
To re-enable IPv6, take away the above traces from /and so on/sysctl.conf and reboot the machine.
SEE: Learn how to View Your SSH Keys in Linux, macOS, and Home windows (TechRepublic)
The warnings
If you’re utilizing X Forwarding by ssh, disabling IPv6 might break this technique. To unravel that downside, you want the /and so on/ssh/sshd_config file and alter the #AdresFamilie any on AddressFamilynet. Save that file and restart sshd.
Should you use Postfix, you could expertise issues beginning the service. To repair this, you will have to make use of an IPv4 loopback. Open the /and so on/postfix/most important.cf file, remark out the localhost line, and add the IPv4 loopback as follows:
#inet_interfaces = localhost
inet_interfaces = 127.0.0.1
SEE: Learn how to Set Non permanent Surroundings Variables in Linux (TechRepublic)
An imperfect answer
It isn’t an ideal answer, however generally it’s important to be inventive in fixing issues. Should you encounter unusual community errors with Linux servers and PCs, attempt disabling IPv6 that will help you along with your troubleshooting or to supply a workaround.
This text was initially printed in June 2016. It was up to date in January 2025 by Antony Peyton.
————————
BSB UNIVERSITY – AISKILLSOURCE.COM