How to Disable IPv6 in Apache Server

Call Sales: 877-435-2445

Linux Services

Blog

How to Disable IPv6 in Apache Server

Posted by Jeff H. 09/08/2010

Disable IPv6 in ApacheWhile we will certainly need to move to IPv6 when all of the IPv4 space is gone, right now, there is no reason to run Apache with IPv6 unless you need it. Disabling it is easy. Just a couple of quick changes to the Listen directive. I often do this as part of our ongoing optimizations for clients that use our Linux server management service.

IPv6 is on by Default

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:

Listen 80

Turn off IPv6 in Apache

To turn off IPv6 in Apache, just change the Listen directive to:

Listen 0.0.0.0:80

This will limit Apache to listening only to IPv4 connections. Repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.

Security

While I’ve not seen any security issues by leaving this on, I always like to minimize the threat surface as a matter of habit. If you only need Apache to listen on a set of IPs, specify just those IP addresses. Many dedicated server providers are turning up their IPv6 connections, so you don’t want to leave them exposed if you are not using them.

Comments

Yurtdışı Eğitim commented on How to Disable IPv6 in Apache Server

Yurtdışı Eğitim · 09/08/2010 03:19 pm

I like it very much, thanks a lot.

Miami Web Design commented on How to Disable IPv6 in Apache Server

Miami Web Design · 09/10/2010 10:12 am

nice :D

Mike commented on How to Disable IPv6 in Apache Server

Mike · 10/15/2010 10:41 am

Thanks. I used this tip on my wordpress site.

Yurtdışı Eğitim commented on How to Disable IPv6 in Apache Server

Yurtdışı Eğitim · 02/07/2011 05:27 pm

great, thanks for sharing

Tatil commented on How to Disable IPv6 in Apache Server

Tatil · 04/22/2011 07:50 am

Thanks….

yurtdışı eğitim commented on How to Disable IPv6 in Apache Server

yurtdışı eğitim · 05/04/2011 05:43 pm

thnks

Add Comment

Notify me of comments?

Server Management

SUBSCRIBE

rackAID Server Management Blog RSS Feed Follow rackAID Server Management on Twitter I Like rackAID's Server Help Contact rackAID about IT Support

Find Out More

Our Blog