How to Disable IPv6 in Apache Server
If there is no reason to run Apache with IPv6 then disabling it is wasy. We need to make quick changes to the Listen directive.
By default, Apache will listen on all IPs, both IPv6 and IPv4. (Assuming your system has IPv6 support). This is controlled by the Listen directive:
Turn off IPv6 in Apache
To turn off IPv6 in Apache, just change the Listen directive to:
This will limit Apache to listening only to IPv4 connections. We can repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.
Howto disable ipv6 networking
First check if the module is loaded:
To check if this module is currently loaded in your system, issue the following command as root. If you see ipv6 in its output, then the module is loaded.
Disable ipv6 in ubuntu:
You need to edit the aliases file using the following command:
sudo nano /etc/modprobe.d/aliases
Find
change to
alias net-pf-10 off
alias ipv6 off
Save the file and reboot.
Disable ipv6 in Fedora/Centos:
Open your modprob.conf file and add following line:
Add
Or disable it with the following command.
How to disable IPv6 in RHEL 5, Fedora, CentOS?
In Red Hat Enterprise 5 Linux internet protocol version 6 (IPv6) module is turned on by default and if your network is not ready to run IPv6 then you need to turn it off on your Linux server.
Steps to disabled IPv6 on RHEL 5:
1. In Fedora, CentOS or RHEL5 Linux modules are loaded using /etc/modprobe.conf file.
Add these line to disable autloading of IPv6 module in /etc/modprobe.conf
alias net-pf-10 off
alias ipv6 off
2. Next edit /etc/sysconfig/network
# vi /etc/sysconfig/network
Change to the following.
3. Also to disable the IPv6 service.
4. permanently disabling.
# chkconfig ip6tables off
Struture of IPv6
The basic structure of IPv6
128 bits as the total
48 bits prefix to the site
16 bits for the subnets in the site
64 bits for host part
Also the stucture of IPv6 from left to right
3 bits: 001 (10% of the total address space reserved)
next 13 bits for the TLA ( Top Level Aggregator)
8 bits reserved
24 bits for the NLAs (Next level Aggregator)
16 bits for the site subnets = 65536 subnets
64 bits for the interface identifier
Total = 128 bits.
Address format of IPv6
Address Format is as follows. It is 128 bit ip address represented in Hexa decimal notation. An example is given below
2001:0000:1234:0000:0000:C1C0:ABCD:0876
this can be also represented as
2001:0000:1234:0:0:C1C0:ABCD:0876
When there are two consecutive zeros this can be represented also as
2001:0000:1234::C1C0:ABCD:0876
In browser you can access the site using ip. This can be done by putting square brackets as show below
http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]/
Also if you want to access a particular port give like this
http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]:8080