Service Configuration and IPv6 notation formats

In IPv4-land addresses are always written the same way.

Not so much with IPv6.

Here is a short rundown on what notations are around in IPv6 configuration land.

  • exim4: double every colon: 2001::db8::::/32 (exception from the norm)
  • nginx: listen [2001:db8::1]:80;
  • apache: Listen [2001:db8::1]:80
  • stunnel.conf: 2001:db8::1:80 (exception from the norm)
  • slapd.conf (LDAP): access to * by by peername.ipv6=2001:db8::1 read
  • munin-node: allow ^2001:db8::1$
  • sshd_config: ListenAddress 2001:db8::1
  • tinyproxy.conf: Listen 2001:db8::1
  • bind: options { listen-on-v6 { 2001:db8::1; 2001:db8::2; } }
  • nullmailer: broken in Debian regarding IPv6, dontuse

Generally, syntax formats including a port number are written using the bracket syntax [address]:port (except stunnel). If no port is specified, the brackets are not used. exim4 is a special case, because the colon “:” is used as default delimiter in exim4′s configuration format, and hence needs to be escaped using a second “:”.

Do you know other examples? Please submit a comment.

Note that the examples use the reserved 2001:db8::/32 prefix as specified by RFC 3849 for documentation purposes.