Development discussion of WireGuard
 help / color / mirror / Atom feed
* nat traversal / userspace impl
@ 2017-04-17 17:45 Jason E. Aten
  2017-04-17 17:55 ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Jason E. Aten @ 2017-04-17 17:45 UTC (permalink / raw)
  To: wireguard

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

New to Wireguard, it looks super interesting... quick questions:

1. If it uses UDP only, how does NAT traversal (firewall punch through)
work?

2. are there userspace implementations available...?

Experience thus far: The src packages that are in repos for centos 7 were
insufficient to compile. I downloaded full wireguard source and tried to
compile the wireguard kernel module on centos 7.3 with kernel 3.10, no
luck, lots of compile time header issues. I upgraded to kernel 4.10 and
could compile the wireguard module under kernel 4.10, but then got stuck on
how to compile the dependent modules;hey aren't specific to wireguard, but
rather generic modules that just weren't in the default 4.10 kernel and I'm
not sure how to build them.

[root@k0 src]# insmod ./wireguard.ko
insmod: ERROR: could not insert module ./wireguard.ko: Unknown symbol in
module
[root@k0 src]# dmesg
...
[77292.707469] wireguard: Unknown symbol udp_sock_create4 (err 0)
[77292.711122] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
[77292.714899] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
[77292.718642] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
[77292.722699] wireguard: Unknown symbol udp_sock_create6 (err 0)
[77292.726007] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
[root@k0 src]#

Anywho, a userland implementation would be easier to play with. Are such
out there?

Thanks!

Jason

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nat traversal / userspace impl
  2017-04-17 17:45 nat traversal / userspace impl Jason E. Aten
@ 2017-04-17 17:55 ` Jason A. Donenfeld
  2017-04-17 21:28   ` Jason E. Aten
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2017-04-17 17:55 UTC (permalink / raw)
  To: Jason E. Aten; +Cc: WireGuard mailing list

On Mon, Apr 17, 2017 at 7:45 PM, Jason E. Aten <j.e.aten@gmail.com> wrote:
> 1. If it uses UDP only, how does NAT traversal (firewall punch through)
> work?

The same way UDP punching works every place else.

>
> 2. are there userspace implementations available...?

In the works.

> compile the wireguard kernel module on centos 7.3 with kernel 3.10, no luck,

I'll try to debug under centos' 3.10 kernel. Thanks for the report.

> lots of compile time header issues. I upgraded to kernel 4.10 and could
> compile the wireguard module under kernel 4.10, but then got stuck on how to
> compile the dependent modules;hey aren't specific to wireguard, but rather
> generic modules that just weren't in the default 4.10 kernel and I'm not
> sure how to build them.
>
> [root@k0 src]# insmod ./wireguard.ko
> insmod: ERROR: could not insert module ./wireguard.ko: Unknown symbol in
> module
> [root@k0 src]# dmesg
> ...
> [77292.707469] wireguard: Unknown symbol udp_sock_create4 (err 0)
> [77292.711122] wireguard: Unknown symbol udp_tunnel6_xmit_skb (err 0)
> [77292.714899] wireguard: Unknown symbol udp_tunnel_sock_release (err 0)
> [77292.718642] wireguard: Unknown symbol setup_udp_tunnel_sock (err 0)
> [77292.722699] wireguard: Unknown symbol udp_sock_create6 (err 0)
> [77292.726007] wireguard: Unknown symbol udp_tunnel_xmit_skb (err 0)
> [root@k0 src]#

Try running `make install && modprobe wireguard` and see if that does
what you want.
Barring that, you can try `modprobe udp_tunnel && modprobe ip6_udp_tunnel`.

Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nat traversal / userspace impl
  2017-04-17 17:55 ` Jason A. Donenfeld
@ 2017-04-17 21:28   ` Jason E. Aten
  2017-04-17 21:30     ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Jason E. Aten @ 2017-04-17 21:28 UTC (permalink / raw)
  To: Jason A. Donenfeld, WireGuard mailing list

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

On Mon, Apr 17, 2017 at 12:55 PM, Jason A. Donenfeld <Jason@zx2c4.com>
wrote:

> On Mon, Apr 17, 2017 at 7:45 PM, Jason E. Aten <j.e.aten@gmail.com> wrote:
> > 1. If it uses UDP only, how does NAT traversal (firewall punch through)
> > work?
>
> The same way UDP punching works every place else.
>

Thanks, Jason, for the quick reply.

If I read through the wikipedia article on UDP hole punching, it (
https://en.wikipedia.org/wiki/UDP_hole_punching) suggests that a public 3rd
party is needed.

> S is a public server with a well-known, globally reachable IP address.

...which makes total sense. Conversely, I don't see described anywhere a
public 3rd party protocol for wireguard clients to rendezvous.

I found this post:
https://lists.zx2c4.com/pipermail/wireguard/2016-August/000372.html, which
makes rendezvous seem like an after thought.

Should I conclude that addressing NAT-ed clients is not something that
WireGuard itself plans to address?

The "number of security problems" with the approach mentioned in passing in
the 2016-August message would need enumeration and addressing. Is anybody
thinking about those? Is this on the roadmap for future plans?

Regards,
Jason

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nat traversal / userspace impl
  2017-04-17 21:28   ` Jason E. Aten
@ 2017-04-17 21:30     ` Jason A. Donenfeld
  2017-04-17 21:36       ` Jason E. Aten
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2017-04-17 21:30 UTC (permalink / raw)
  To: Jason E. Aten; +Cc: WireGuard mailing list

On Mon, Apr 17, 2017 at 11:28 PM, Jason E. Aten <j.e.aten@gmail.com> wrote:
> The "number of security problems" with the approach mentioned in passing in
> the 2016-August message would need enumeration and addressing. Is anybody
> thinking about those? Is this on the roadmap for future plans?

If you're referring to the proof of concept example code for hole
punching... it's just PoC/example code. If you'd like to develop it
into something production worthy, you're more than welcome. It's
licensed under the GPLv2.

Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nat traversal / userspace impl
  2017-04-17 21:30     ` Jason A. Donenfeld
@ 2017-04-17 21:36       ` Jason E. Aten
  0 siblings, 0 replies; 5+ messages in thread
From: Jason E. Aten @ 2017-04-17 21:36 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

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

On Mon, Apr 17, 2017 at 4:30 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:

> If you're referring to the proof of concept example code for hole
> punching... it's just PoC/example code. If you'd like to develop it
> into something production worthy, you're more than welcome. It's
> licensed under the GPLv2.
>

I might consider it. What are the security problems that needed solving?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-17 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-17 17:45 nat traversal / userspace impl Jason E. Aten
2017-04-17 17:55 ` Jason A. Donenfeld
2017-04-17 21:28   ` Jason E. Aten
2017-04-17 21:30     ` Jason A. Donenfeld
2017-04-17 21:36       ` Jason E. Aten

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).