Live data from Hacker News

Getting Started with WireGuard

miguelmota.com

61–70 of 72 posts

Re: Getting Started with WireGuard

#61
post #54

Earlier quoted context omitted.

In my experience, this does work somewhat, but doesn't set up the routes properly[1] and doesn't provide an interface to the networkmanager applet, so you are still left with configuring the profiles in the terminal. There is much left to be desired. Sadly the third-party plugin isn't much better and seems to be discontinued[2]. [1] https://forum.manjaro.org/t/wireguard-with-networkmanager-1-... [2] https://github.co…

I seem to recall configuring it entirely (sans key generation) in KDE Plasma network settings. I'm guessing you're referring to another applet?

I'm not an expert in KDE but I mean this applet: https://gitlab.gnome.org/GNOME/network-manager-applet.git

I assume that I can't really install the KDE applet without installing the entire KDE suite, so this was my goto solution.

Edit: I see that wireguard support is in the works but is not merged yet: https://gitlab.gnome.org/GNOME/network-manager-applet/-/merg...

Re: Getting Started with WireGuard

#62
post #16

Earlier quoted context omitted.

re smaller surface area, adding some numbers, "WireGuard weighs in at around 4,000 lines of code; this compares to 600,000 total lines of code for OpenVPN + OpenSSL or 400,000 total lines of code for XFRM+StrongSwan for an IPSEC VPN. Two orders of magnitude fewer lines of code mean a lot less attack surface to find flaws in." https://arstechnica.com/gadgets/2018/08/wireguard-vpn-review... note openvpn sans openssl is…

> ...compared to the horrors that are OpenVPN and IPSec, it's a work of art. https://wireguard.com/ should put that quote up as a, well, social proof .

WireGuard’s protocol was also formally verified by a third party [0]. That makes me more confident in using it than any social proof whatsoever :)

[0] https://prosecco.gforge.inria.fr/personal/bblanche/cryptover...

Re: Getting Started with WireGuard

#63
post #13

Hm. I guess no-one has bothered with nftables yet, even when dealing with network code that's becoming part of the new upstream kernel (not just this blog, AFAIK wireguard upstream doesn't have any examples on using nftables either, just iptables). I guess we need a new networking how-to? Anyone aware of some resources I might have missed? OK, I guess the nftables wiki is the "how-to": https://wiki.nftables.org/wiki-…

IMO nftables is best used with your full ruleset defined in a file, and atomically loaded. nftables certainly does make your ruleset more grokkable than statefully appending ad-hoc rules everywhere, but you necessarily need the whole picture to gain from it. So unfortunately it makes less sense for one-liners. Case in point: to use the masquerade action in a postrouting/nat chain, you also have to register a (possibl…

So unfortunately it makes less sense for one-liners. Case in point: to use the masquerade action in a postrouting/nat chain, you also have to register a (possibly empty) prerouting/nat chain.

You don't have to do that since Linux 4.18: https://wiki.nftables.org/wiki-nftables/index.php/Performing...

Re: Getting Started with WireGuard

#64
post #50
post #37

Earlier quoted context omitted.

The community kind of skipped right over nftables to BPF. Simple use cases use iptables, complicated ones use BPF, nftables isn't flexible enough for the complicated use cases so everyone keeps using iptables.

even for simple cases, I prefer nftables. If for no other reason thn I think the syntax is simpler and easier to understand.

Sure, but most admins have to learn iptables anyway, and many prefer to learn one tool instead of two.

Re: Getting Started with WireGuard

#65
post #56

Does anyone have a guide for setting up server-to-server wireshark connection? Everything I have found so far is about consumer VPN stuff. I'm interested in possibly using wireshark for server-to-server as a less painful alternative to TLS.

Assuming you meant Wireguard both times, I have a small guide I wrote for my team that I can throw up on my site. If I don't post a link here in a couple hours, reply here so I get a notification.

Yes somehow I had wireshark in mind! :)

Re: Getting Started with WireGuard

#66
post #56

Does anyone have a guide for setting up server-to-server wireshark connection? Everything I have found so far is about consumer VPN stuff. I'm interested in possibly using wireshark for server-to-server as a less painful alternative to TLS.

Here's a (cleaned up) guide from our internal docs: https://miha.frangez.me/2020/04/08/wireguard-point-to-point-...

Re: Getting Started with WireGuard

#68
post #54

If you're using NetworkManager and wireguard, try out the integration between the two as well. It lets you treat the tunnel as any other VPN in nm, and also easily avoids some issues with routing loops if you roam back on to your home network. Before, I always had to manually use wg-quick when I came back home or left. http://blogs.gnome.org/thaller/2019/03/15/wireguard-in-netwo...

In my experience, this does work somewhat, but doesn't set up the routes properly[1] and doesn't provide an interface to the networkmanager applet, so you are still left with configuring the profiles in the terminal. There is much left to be desired. Sadly the third-party plugin isn't much better and seems to be discontinued[2]. [1] https://forum.manjaro.org/t/wireguard-with-networkmanager-1-... [2] https://github.co…

Interesting. I haven't had that happen because I do split-tunnel, but I will have to keep that in mind in scenarios when I try to forward everything thru the tunnel. All I needed to do for split tunnel was just adjust the route metric. (https://tujun.ga/2020/02/18/wireguard/) Agreed about the lack of GUI though, I do wish there was a GTK applet for it.

Re: Getting Started with WireGuard

#69
post #37
post #13

Hm. I guess no-one has bothered with nftables yet, even when dealing with network code that's becoming part of the new upstream kernel (not just this blog, AFAIK wireguard upstream doesn't have any examples on using nftables either, just iptables). I guess we need a new networking how-to? Anyone aware of some resources I might have missed? OK, I guess the nftables wiki is the "how-to": https://wiki.nftables.org/wiki-…

The community kind of skipped right over nftables to BPF. Simple use cases use iptables, complicated ones use BPF, nftables isn't flexible enough for the complicated use cases so everyone keeps using iptables.

What is BPF (in the context of iptables/nftables replacement) exactly? I tried searching for it, but only found some articles about early stage kernel support. Nothing about userspace or how to use it at all. It looks like there's still no BPF firewall at this time.

Re: Getting Started with WireGuard

#70
post #37
post #13

Hm. I guess no-one has bothered with nftables yet, even when dealing with network code that's becoming part of the new upstream kernel (not just this blog, AFAIK wireguard upstream doesn't have any examples on using nftables either, just iptables). I guess we need a new networking how-to? Anyone aware of some resources I might have missed? OK, I guess the nftables wiki is the "how-to": https://wiki.nftables.org/wiki-…

The community kind of skipped right over nftables to BPF. Simple use cases use iptables, complicated ones use BPF, nftables isn't flexible enough for the complicated use cases so everyone keeps using iptables.

@WGH_ You're dead - presumably because the profile is new, and immediately made a comment? I think maybe anti-spam is a bit aggressive, unless there's some linked account that accounts for the ban?

At any rate, I agree information on bpf as a iptables work-a-like is scarce. This helps a bit:

https://www.netronome.com/blog/bpf-ebpf-xdp-and-bpfilter-wha...

Then there's of course the kernel docs, eg: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

See also: https://blog.cloudflare.com/introducing-the-bpf-tools/

Post reply on HN