Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Ryan Whelan <rcwhelan@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Specifying the source port
Date: Thu, 4 May 2017 20:54:07 +0200	[thread overview]
Message-ID: <CAHmME9orHUhg0oLgbRZMV2Gq49Kv=VCQxR-6Fovp7xXiH_Va8Q@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9r=jk7dgL5nn3HZ2bFFQe-3weLcExy8V_Bor70svSZsYA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

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@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!

ryan

On Thu, May 4, 2017 at 2:43 PM, Jason A. Donenfeld <Jason@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@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@zx2c4.com>
>> wrote:
>>
>>> "ListenPort", " listen-port"
>>>
>>> On May 4, 2017 20:21, "Ryan Whelan" <rcwhelan@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@lists.zx2c4.com
>>> https://lists.zx2c4.com/mailman/listinfo/wireguard
>>>
>>>
>>>
>>

[-- Attachment #2: Type: text/html, Size: 4159 bytes --]

  parent reply	other threads:[~2017-05-04 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 18:21 Ryan Whelan
     [not found] ` <CAHmME9p0L8WjCvcrtk+8AeOxmnExSK5YhnCcNbYmxmp_Yc_ejg@mail.gmail.com>
2017-05-04 18:35   ` Jason A. Donenfeld
2017-05-04 18:41     ` Ryan Whelan
2017-05-04 18:43       ` Jason A. Donenfeld
2017-05-04 18:47         ` Ryan Whelan
     [not found]           ` <CAHmME9rSXyOPCO1GLhWKuXTZk+b8swNmEoHeYPosWJ5vt83pmg@mail.gmail.com>
     [not found]             ` <CAHmME9oECt9DR9knvxnTynYwvRtEXvBv+U+WHjVPWWM1yGCWSQ@mail.gmail.com>
     [not found]               ` <CAHmME9r=jk7dgL5nn3HZ2bFFQe-3weLcExy8V_Bor70svSZsYA@mail.gmail.com>
2017-05-04 18:54                 ` Jason A. Donenfeld [this message]
2017-05-04 18:45       ` Jonathon Fernyhough

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='CAHmME9orHUhg0oLgbRZMV2Gq49Kv=VCQxR-6Fovp7xXiH_Va8Q@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=rcwhelan@gmail.com \
    --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).