Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Tomas Herceg <tth@rfa.cz>
To: wireguard@lists.zx2c4.com
Subject: listen on specific IP only
Date: Wed, 20 Jun 2018 19:18:48 +0200	[thread overview]
Message-ID: <8d3124af-de51-3253-8b89-02233566c4f9@rfa.cz> (raw)

Helo,
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

ListenPort=53

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 172.16.16.6:53          0.0.0.0:* 
LISTEN      3372/pdns_recursor
tcp        0      0 192.168.11.1:53         0.0.0.0:* 
LISTEN      3372/pdns_recursor
tcp        0      0 127.0.0.1:53            0.0.0.0:* 
LISTEN      3372/pdns_recursor
udp        0      0 172.16.16.6:53          0.0.0.0:* 
        3372/pdns_recursor
udp    30720      0 192.168.11.1:53         0.0.0.0:* 
        3372/pdns_recursor
udp        0      0 127.0.0.1:53            0.0.0.0:* 
        3372/pdns_recursor

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

Thanks Tomas

             reply	other threads:[~2018-06-20 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 17:18 Tomas Herceg [this message]
2018-06-20 17:50 ` Jason A. Donenfeld
2018-06-20 18:17   ` Tomas Herceg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d3124af-de51-3253-8b89-02233566c4f9@rfa.cz \
    --to=tth@rfa.cz \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).