Configuration ip address Data Type

The ip address data type contains IP addresses and netmasks. Both numerical IP addresses and host names are allowed.

Note
Relying on DNS is problematic.
We strongly recommend using numerical IP addresses instead of host names. When a host name is used, the server has to perform a DNS lookup. If the DNS lookup fails or times out, the server will be unable to start, or may be blocked at run-time. Using numerical IP addresses means that the server will always be able to run.

The configuration directives which take IP addresses and host names follow a fixed naming scheme, as given below.

Name Description

ipaddr

IP address. Can be IPv4 or IPv6. If given a hostname, the first IPv4 address for that hostname is used.

ipv4addr

IPv4 address. If given a hostname, the hostname must resolve to an IPv4 address.

ipv6addr

IPv6 address. If given a hostname, the hostname must resolve to an IPv6 address.

host

A hostname, as with ipaddr, above.

server

A hostname, as with ipaddr, above.

In some cases (e.g. with clients), an IP address network and mask can be used.

Example
ipaddr = 192.0.2.16
ipv6addr = ::1
host = example.com
ipaddr = 192.0.2/24