listen on specific IP only

Tomas Herceg tth at
Wed Jun 20 19:18:48 CEST 2018

is there a way to listen on specific IP/interface? i need it to use same 
port for multiple applications - 53 for DNS and wireguard because of 
firewall rules i can't controll. I have multiple IPs on the server each 
for specific use. DNS recursor is listening only on private interfaces 
and i want wireguard will be on public IP.

if i try


it fails with:
Jun 20 19:12:52 athos wg-quick[19091]: RTNETLINK answers: Address 
already in use

but all my public IPs are not used with this port:

netstat -tulpn |grep 53
tcp        0      0* 
LISTEN      3372/pdns_recursor
tcp        0      0* 
LISTEN      3372/pdns_recursor
tcp        0      0  * 
LISTEN      3372/pdns_recursor
udp        0      0* 
udp    30720      0* 
udp        0      0  * 

is there any workaround for that for now? will some type of DNAT works?

Thanks Tomas

More information about the WireGuard mailing list