Web and Mail Servers with IPv6

Testing the Web Server

The setup work is nearly done at this point. The next step is to configure the DNS name you created previously ipv6.Domainname.com as VirtualHost . The DocumentRoot should point to a directory in which you already have a content management system or static web content in place. This setup lets you test your web application for IPv6 capability on the fly.

To check the web server’s IPv6 capabilities, you can surf to http://ipv6.Domainname .com in your client’s browser. You should see the web content that you put in DocumentRoot . Because DNS only has one IPv6 address for ipv6.Domainname.com , this can only be an IPv6 TCP/​IP connection.

If you use a failover setup that relies on heartbeats or some other method, you’ll need to look for one IPv6-specific quirk: experience shows that a short time can elapse on a Linux system before an Apache server binds to a previously configured IPv6 address. If needed, add a short wait to your heartbeat scripts. A wait of just a few seconds will be sufficient to allow your Apache to bind to the IPv6 address.

The dual-stack Apache, which is now correctly configured, shouldn’t cause you any trouble. Web statistics, as gathered by Webalizer, for example (Figure 4), will not typically worry about the IPv6 addresses.

Figure 4: Apache logfile tools like Webalizer are not typically fazed by interpreting IPv6 connections and will work in dual-stack mode without complaint.

The Mail Server in Dual Stack Mode

You will probably want to get your mail server ready for the new Internet, too. Be prepared for the typical issues in representing the IPv6 addresses in the configuration file. Exim, which I will use as an example in this article, uses a colon to separate IP addresses in its configuration. That means you need to define a different separator – the new separator follows the option with the angled brackets:

hostlist relay_from_hosts = <; 85.214.7.0/24; 2a01:238:10b::/56

If you are configuring multiple IPv6 addresses at the same time on a system, you must define which service uses which IPv6 address. For Exim, you can define the configured IPv6 address that the mail server uses for outgoing connections in the corresponding SMTP transport. Again, you need to use a different separator for the IPv6 addresses:

driver = smtp
interface = <; 85.214.7.192;2a01:238:10b:3310::11

Without the explicitly defined IP address for outgoing connections (IPv4/IPv6), the kernel will choose one of the existing IP addresses for outgoing connections – typically, the last configured IP. A static configuration is preferable if you assign specific IP addresses to specific services, or if you want to use a specific IP address for external communication.

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=