How to disable IPv6 on Linux – TechRepublic

Register for your free TechRepublic membership or if you are already a member, sign in using your preferred method below.
We recently updated our Terms and Conditions for TechRepublic Premium. By clicking continue, you agree to these updated terms.
Invalid email/username and password combination supplied.
An email has been sent to you with instructions on how to reset your password.
By registering, you agree to the Terms of Use and acknowledge the data practices outlined in the Privacy Policy.
You will also receive a complimentary subscription to TechRepublic’s News and Special Offers newsletter and the Top Story of the Day newsletter. You may unsubscribe from these newsletters at any time.
Username must be unique. Password must be a minimum of 6 characters and have any 3 of the 4 items: a number (0 through 9), a special character (such as !, $, #, %), an uppercase character (A through Z) or a lowercase (a through z) character (no spaces).
How to disable IPv6 on Linux
Your email has been sent
If network troubleshooting leads you to believe there’s an issue with IPv6, you may need to shut down that protocol on your Linux machines. Jack Wallen shows you how.
IPv6 offers a much larger addressing scheme than IPv4, which is one of the many reasons why it was developed. However, I have seen rare instances in which IPv6 has caused network problems.
Since some hardware doesn’t take advantage of IPv6 (and most admins are still working with IPv4), a temporary and easy solution is to disable IPv6; the protocol can be re-enabled when the time comes when the issue has been permanently resolved.
SEE: IPv6: The smart person’s guide
If you have hardware that perfectly implements IPv6 and software that uses it correctly, this is a non-issue. But if you’re having networking issues with Linux servers or desktops, and you’ve exhausted all possible areas, you might try disabling v6 of the network protocol.
I’ve had a few instances where communication between a Linux desktop and an ATT UVERSE router would constantly drop, and disabling IPv6 was the only solution that worked. After a while I would re-enable IPv6 to see if a router firmware update (and a desktop OS update) had solved the problem; in some instances, it solved the issue and IPv6 could remain enabled, though in other instances, IPv6 would have to be disabled again.
I’ll show you how to disable IPv6 on a Linux machine. ( Note: I recommend disabling IPv6 only when you’ve exhausted all other options. Also, you should consider this a temporary fix.)
You guessed it, we’re going to be working with the command line. I’ll show you how to disable IPv6 on Red Hat- and Debian-based distributions.
Here’s how to disable the protocol on a Red Hat-based system:
To re-enable IPv6, issue the following commands:
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
Here’s how to disable the protocol on a Debian-based machine.
1. Open a terminal window.
2. Issue the command sudo nano /etc/sysctl.conf
3. Add the following at the bottom of the file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
4. Save and close the file.
5. Reboot the machine.
To re-enable IPv6, remove the above lines from /etc/sysctl.conf and reboot the machine.
If you happen to use X Forwarding through ssh, disabling IPv6 can break this system. To fix that issue, you must open the /etc/ssh/sshd_config file and change the #AddressFamily any to AddressFamily inet. Save that file and restart sshd.
If you use Postfix, you could encounter issues with the service starting. To fix this, you’ll have to use an IPv4 loopback. Open the /etc/postfix/main.cf file, comment out the localhost line, and add the IPv4 loopback like so:
#inet_interfaces = localhost
inet_interfaces = 127.0.0.1
This isn’t a perfect solution, but sometimes you have to be creative in your troubleshooting. If you’re encountering odd networking errors with Linux servers and desktops, try disabling IPv6 to aid you in your troubleshooting or to provide a temporary fix.
How to disable IPv6 on Linux
Your email has been sent
Your message has been sent
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.
These 11 cloud-to-cloud solutions back up your organization’s data so you’ll be covered in the event of deletions, malware or outages. Compare the best online cloud backup services now.
You can use a mobile device to speak with another person directly through the Teams app. Lance Whitney shows you how to use this handy feature.
A phishing technique called Browser in the Browser (BITB) has emerged, and it’s already aiming at government entities, including Ukraine. Find out how to protect against this new threat.
With so many project management software options to choose from, it can seem daunting to find the right one for your projects or company. We’ve narrowed them down to these nine.
Start-ups, DARPA and Accenture Ventures announce research partnerships, new hardware and strategic investments.
Procuring software packages for an organization is a complicated process that involves more than just technological knowledge. There are financial and support aspects to consider, proof of concepts to evaluate and vendor negotiations to handle. Navigating through the details of an RFP alone can be challenging, so use TechRepublic Premium’s Software Procurement Policy to establish …
Recruiting a Security Analyst with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, recruit and hire the best candidates for a …
Recruiting a DevOps engineer with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, recruit and hire the best candidates for a …
Video game writing jobs are in demand. Recruiting a video game/quest writer with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit from TechRepublic Premium includes a job description, sample interview questions and a basic want ad that you can customize for your business to find, interview, …

source

We will be happy to hear your thoughts

Leave a reply

LINXGO
Logo
Compare items
  • Total (0)
Compare