[WireGuard] Client changes endpoint port, why?

Jan De Landtsheer jan at incubaid.com
Thu Jul 7 10:27:31 CEST 2016


Testing out this little thingie ; looks Grrrr-eat!
I dont understand why the client setup changes it’s port after a while:

[delandtj at rt01 ~]$ sudo wg
interface: wg0
  public key: fppppppppppppppppppppppppppppppppp=
  private key: IiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiE=
  listening port: 23123

peer: RnPeeerrreeeerrrk=
  endpoint: xxx.xxx.xxx.126:51820
  allowed ips: 192.168.251.1/32
  latest handshake: 2 minutes, 14 seconds ago
  bandwidth: 658 B received, 944 B sent
[delandtj at rt01 ~]$ ping 192.168.251.1
PING 192.168.251.1 (192.168.251.1) 56(84) bytes of data.
64 bytes from 192.168.251.1: icmp_seq=1 ttl=64 time=10.5 ms
^C
--- 192.168.251.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 10.544/10.544/10.544/0.000 ms

Yay! now wait a few minutes

[delandtj at rt01 ~]$ ping 192.168.251.1
PING 192.168.251.1 (192.168.251.1) 56(84) bytes of data.
^C
--- 192.168.251.1 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4009ms

[delandtj at rt01 ~]$ sudo wg
interface: wg0
  public key: ppppppppppppppppppppppppppppppppppppc=
  private key: Iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii3my0E=
  listening port: 23123

peer: RPeeerrrreeerrrrrpppppppppppppppk=
  endpoint: xxx.xxx.xxx.126:17409
  allowed ips: 192.168.251.1/32
  latest handshake: 13 minutes, 55 seconds ago
  bandwidth: 4.23 KiB received, 6.42 KiB sent

Ugh… endpoint port changed ? why ?
Let’s set it back

[delandtj at rt01 ~]$ sudo wg setconf wg0 wg/conf
[delandtj at rt01 ~]$ sudo wg
interface: wg0
  public key: frILpppppppppppppppppppppppppppppppppppppppppppp/Qc=
  private key: IJiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii=
  listening port: 23123

peer: RnOKNCpBs2Wf2dQP9Gedd+jCVkcOJOQ0m5FK+3WFGmk=
  endpoint: xxx.xxx.xxx.126:51820
  allowed ips: 192.168.251.1/32
[delandtj at rt01 ~]$ ping 192.168.251.1
PING 192.168.251.1 (192.168.251.1) 56(84) bytes of data.
64 bytes from 192.168.251.1: icmp_seq=1 ttl=64 time=25.0 ms
^C
--- 192.168.251.1 ping statistics ---
2 packets transmitted, 1 received, 50% packet loss, time 1000ms
rtt min/avg/max/mdev = 25.066/25.066/25.066/0.000 ms

So… am I missing something ?

Jan
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20160707/c9335292/attachment.html>


More information about the WireGuard mailing list