How to enable IPv6 on bind9

Below are snippets for the settings you can use to enable IPv6 on bind9. These settings can be changed/added from /etc/bind/named.confand /etc/bind/named.conf.options.

IPv6 is supported since version 9. Always use newest available version. At least version 9.1.3 must be used, older versions can contain remote exploitable security holes.

  • listen-on-v6 { any; };
  • (enable IPv6 for listening)
      

    Transfer source address is used for outgoing zone transfers:

  • transfer-source-v6 [port port];
  • (Transfer source address)
      

    Notify source address is used for outgoing notify messages:

  • notify-source-v6 [port port];
  • (Notification address)
      

    Source and more information: http://tldp.org/HOWTO/Linux+IPv6-HOWTO/hints-daemons-bind.html and https://help.ubuntu.com/community/BIND9ServerHowto

    How to enable IPv6 on Apache2

    Below are snippets for the settings you can use to enable IPv6 on Apache2. These settings can be changed/added from /etc/apache2/ports.conf

    You can use multiple Listen directives to listen on multiple IP’s. This goes for both IPv4 and IPv6.

  • Listen *
  • (Both IPv4 and IPv6 on every IP)

  • Listen 192.168.0.100
  • (IPv4 Only)

  • Listen Listen [2001:db8::a00:20ff:fea7:ccea]:80
  • (IPv6 Only)

    You can also specify the port apache uses with the Listen directive. To listen op port 443 on both IPv4 and IPv6 use the following:

  • Listen 443
  • (Both IPv4 and IPv6 on every IP on port 443)
      

    These vhosts go in /etc/apache2/sites-enabled/nameofyourvhost.conf
    Set a vhost on all IP’s (both IPv4 and IPv6).

    <virtualhost *:80>
       ServerName fix6.net
       ServerAlias *.fix6.net
       DocumentRoot /www/fix6.net/public_html
       ErrorLog /www/fix6.net/logs/error_log
       Customlog /www/fix6.net/logs/combined_log combined
    </virtualhost>

    Set vhost to a specific IPv6 only

    <virtualhost [2001:db8::a00:20ff:fea7:ccea]:80>
       ServerName fix6.net
       ServerAlias *.fix6.net
       DocumentRoot /www/fix6.net/public_html
       ErrorLog /www/fix6.net/logs/error_log
       Customlog /www/fix6.net/logs/combined_log combined
    </virtualhost>

    Set vhost to a specific IPv4 and IPv6 adres

    <virtualhost 192.168.1.100:80, [2001:db8::a00:20ff:fea7:ccea]:80>
       ServerName fix6.net
       ServerAlias *.fix6.net
       DocumentRoot /www/fix6.net/public_html
       ErrorLog /www/fix6.net/logs/error_log
       Customlog /www/fix6.net/logs/combined_log combined
    </virtualhost>

    Source and more information: http://httpd.apache.org/docs/2.2/mod/mpm_common.html and http://httpd.apache.org/docs/2.2/vhosts/name-based.html

    How to enable IPv6 on Postfix

    Below are snippets for the settings you can use to enable IPv6 on Postfix. These settings can be changed/added from /etc/postfix/main.cf

    Select the protocols which postfix uses:

  • inet_protocols = ipv4
  • (DEFAULT: enable IPv4 only)

  • inet_protocols = all
  • (enable IPv4, and IPv6 if supported)

  • inet_protocols = ipv4, ipv6
  • (enable both IPv4 and IPv6)

  • inet_protocols = ipv6
  • (enable IPv6 only)

    Set the listen interface:

  • inet_interfaces = all
  • (DEFAULT, all IPv4 and IPv6 interfaces available)

  • inet_interfaces = loopback-only
  • (Postfix version 2.2 and later)

  • inet_interfaces = 127.0.0.1
  • (Just Localhost)

  • inet_interfaces = 127.0.0.1, [::1]
  • (Postfix version 2.2 and later)

  • inet_interfaces = 192.168.1.2, 127.0.0.1
  • (Multiple IPv4)

  • inet_interfaces = [2001:db8::dddd:eeee:ffff], [2001:db8:42:1af::1]
  • (Postfix version 2.2 and later)

    You can also set the preferred SMTP IP to be used.

  • smtp_bind_address6 = 2001:db8:42:1af::1
  •  
     

    Source and more information: http://www.postfix.org/IPV6_README.html