Knowledgebase

How to disable IPv6 on Centos

There are times where you might need to disable IPv6 on your Centos Server. Below are the options that you can use:

Add kernel variable into /etc/sysctl.conf.

You can do this by editing /etc/sysctl.conf using your favourite editor.

for us, we use "nano /etc/sysctl.conf" and add below kernel variable:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Once done, you can run "sysctl -p" to force the changes.

OR

you do it by opening your command prompt and run below command.

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

OR

you do it by opening your command prompt and run below command.

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

All of the above will help you to disable the IPv6 features.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to register or buy hosting?

1)      Login into our website, myduniahosting.com. Click on “LOGIN”. 2)      Then click on...

Files fail FTP transfer

When uploading many files at once (a CMS, for example), it is not uncommon for a few of the files...

My webpage is displaying ads

If your website is not pulling up and is instead showing advertisements, the most likely cause is...

Cannot connect to database

This error will occur within a web application when any of the following conditions are met:...

What are error pages?

Error pages are the pages displayed when a user tries to access a location on your site and...