Specifying the source port

Jason A. Donenfeld Jason at zx2c4.com
Thu May 4 20:54:07 CEST 2017

UDP is a bit strange like that. Everything implicitly must "listen" when
using UDP, even when the source port is ephemeral. So the listening port
and the source port concepts get smushed into one thing.

On May 4, 2017 20:47, "Ryan Whelan" <rcwhelan at gmail.com> wrote:

I believe you- I didn't understand that it used the same port number for
both ingress and egress traffic.  I managed to miss that.

thank you much!


On Thu, May 4, 2017 at 2:43 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:

> My answer remains correct. Use the listen port to control the source port.
> If you don't believe me, try running tcpdump and you'll see.
> On May 4, 2017 20:41, "Ryan Whelan" <rcwhelan at gmail.com> wrote:
>> If i'm not mistaken that sets the listing port on one end (Peer 'A') of
>> the connection.  Peer 'B' needs to know what the listening port is set to,
>> to be able to setup the handshake.  So from peer 'B's perspective, the dst
>> port is the "listen-port' on Peer 'A'.... How do I set the src port for
>> peer 'B' so all traffic from B will come from a predicable source port?
>> I'm sorry if i'm not being clear- I very well might not be using the
>> right terminology
>> ryan
>> On Thu, May 4, 2017 at 2:35 PM, Jason A. Donenfeld <Jason at zx2c4.com>
>> wrote:
>>> "ListenPort", " listen-port"
>>> On May 4, 2017 20:21, "Ryan Whelan" <rcwhelan at gmail.com> wrote:
>>> Hello!
>>> When specifying an endpoint, you have to tell wg which dst port the peer
>>> is listening on- is it possible to tell wg which source port to send
>>> traffic from?  I've looked over the documentation and if its in there, I
>>> managed to miss it.
>>> Thanks!
>>> ryan
>>> _______________________________________________
>>> WireGuard mailing list
>>> WireGuard at lists.zx2c4.com
>>> https://lists.zx2c4.com/mailman/listinfo/wireguard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20170504/825873f4/attachment.html>

More information about the WireGuard mailing list