ip
This specifies the ip address(es) on which the server will listen for incoming connections. The ip attribute can be defined as an IPv4 or an IPv6 address and does not need an additional prefix to determine the type.
Recommended listen configuration:
listen {
# Bind to all IPv4 addresses
ip 0.0.0.0;
# Bind to all IPv6 addresses
ip ::;
}
When the IP attribute is defined as 0.0.0.0 (for IPv4) or 0::0 (for IPv6), the server will listen on all available network interfaces for that particular protocol. If the server is configured with either of those, no other IP addresses with the same protocol can be declared.
Multiple specific IP addresses can also be configured:
listen {
...
ip 127.0.0.1;
ip 192.0.2.42;
ip 2001:db8::42;
ip 2001:db8::43;
}