frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Vxlan over WireGuard or WireGuard over Vxlan?

29•mlhpdx•3h ago
When traversing a public network. Let’s agree going recursive (WireGuard inside VXLAN inside WireGuard) is a bad idea.

Comments

pjd7•1h ago
Tell us why you think so at least.
ronsor•1h ago
Reduced MTU chopping off your maximum packet size from all the extra headers and other overhead you're adding?
DiabloD3•1h ago
I mean, ultimately, thats how Google routes internally.

IPSec-equivalent, VXLAN-equivalent, IPSec-equivalent.

Prevents any compromised layer from knowing too much about the traffic.

pixl97•1h ago
Internal is fine because you control things like MTU so you don't have to worry about packet fragmentation/partial loss.
als0•1h ago
That seems like an awful amount of overhead for questionable gain.
_bernd•1h ago
Links between, and in between data centers use so called jumbo frames with an mtu of over 9000. Not joking.
tucnak•49m ago
What gave you that idea? Internally, Google uses GRE/GENEVE-like stuff but for reasons that have nothing to do with "preventing compromise" or whatever, but because they're carrying metadata (traces, latency budgets, billing ids.) That is to say, encapsulation is just transport. It's pretty much L3 semantics all the way down... In fact, this is more or less the point: L2 is intractable at scale, as broadcast/multicast doesn't work. However, it's hard to find comparisons to anything you're familiar with at Google scale. They have a myriad of proprietary solutions and custom protocols for routing, even though it's all L3 semantics. To learn more:

Andromeda https://research.google/pubs/andromeda-performance-isolation...

Orion https://research.google/pubs/orion-googles-software-defined-...

DiabloD3•9m ago
What gave me that idea? Talks and research papers from Google network engineers over the past decade.
volkadav•1h ago
https://man.openbsd.org/vxlan.4#SECURITY seems unambiguous that it's intended for use in trusted environments (and all else being equal, I'd expect the openbsd man page authors to have reasonable opinions about network security), so it sounds like vxlan over ipsec/wg is probably the better route?
wmf•1h ago
What problem is being solved here?
mbreese•1h ago
What are you trying to do? Why are you trying to link networks across the public internet?
justsomehnguy•1h ago
WG is L3 transport

VXLAN is L2-like tranport over L3

You can have EoIP over WG with any VLANs you like.

You can have a VXLAN over plain IP, over EoIP, over WG, over IPSec. Only WG and IPSec (with not NULL sec) do providecany semblance ofvencryption in transit

And mandatory X\Y problem.

inetknght•1h ago
> Let’s agree going recursive (WireGuard inside VXLAN inside WireGuard) is a bad idea.

But it's not necessarily a bad idea. It depends on the circumstances, even when traversing a public network.

tucnak•1h ago
For traversing public networks, simply consider BGP over Wireguard. VXLAN is not worth it.
ghxst•53m ago
I've used wireguard for a while, not sure why I never considered doing BGP over it, might make for a fun weekend project.
tucnak•45m ago
BGP is vastly superior to any L2 make-believe trash you can imagine, and amazingly, it often has better hardware offloading support for forwarding and firewalls. For example, 100G switches (L3+) like MikroTik's CRS504 do not support IPv6 in hardware for VXLAN-encapsulated flows, but everything just works if you choose to go the BGP route.

L2 is a total waste of time.

uberduper•1h ago
What are your discovery mechanisms? I don't know what exists for automatic peer management with wg. If you're doing bgp evpn for vxlan endpoint discovery then I'd think WG over vxlan would be the easier to manage option.
uberduper•49m ago
If you actually want to use vxlan ids to isolate l2 domains, like if you want multiple hypervisors separated by public networks to run groups of VMs on distinct l2 domains, then vxlan over WG seems like the way to go.
kjuulh•57m ago
I use vxlan on top of wireguard in my hobby set up. Probably wouldn't recommend it for an actual production use-case. But that is more or less because of how my homelab is setup (Hetzner -> Home about 20ms latency roundtrip).

I considered dropping my root wireguard and setting up just vxlan and flannel, but as I need NAT hole punching I kind of need the wireguard root so that is why i ended up with it.

Going Wireguard inside the vxlan (flannel) in my case, would likely be overkill, unless I wanted my traffic between nodes between regions to be separated from other peers on the network, not sure where that would be useful. It is an easy way of blocking out a peer however, but that could just as well be solved on the "root" wireguard node.

There might be some MTU things that would be messed up going nested wireguard networks.

q3k•55m ago
Drop the VXLAN. There's almost never a good reason to stretch L2 over a WAN. Just route stuff across.
cjaackie•40m ago
This is the correct answer, routing between subnets is how it’s suppose to work. I think there are some edge cases like DR where it seems like stretching L2 might sound like a good idea, but it practice it gets messy fast.
formerly_proven•32m ago
VXLAN makes sense in the original application, which is to create routable virtual LANs within data centers.
dgl•33m ago
This.

Instead you can create multiple Wireguard interfaces and use policy routing / ECMP / BGP / all the layer 3 tricks, that way you can achieve similar things to what vxlan could give you but at layer 3.

There's a performance benefit to doing it this way too, in some testing I found the wireguard interface can be a bottleneck (there's various offload and multiple core support in Linux, but it still has some overhead).

iscoelho•9m ago
EVPN/VXLAN fabrics are becoming industry standard for new deployments. MACSEC/IPsec is industry standard for site-to-site.

You'd be surprised to know that this is especially popular in cloud! It's just abstracted away (:

stevefan1999•54m ago
Is there a WireGuard equivalent that does L2 instead of L3? Need this for a virtual mesh network for homelabbing. I have this exact setup, running VXLAN or GENEVE over WireGuard tunnel using KubeSpan from Talos Linux but I simply think having L2 access would make load balancer much easier
kjuulh•43m ago
You can see my reply below: https://news.ycombinator.com/item?id=46609044 I believe our setups are pretty equivalent.

I achieve load balancing by running native wireguard on a vps at hetzner, I've got a native wireguard mesh, I believe Talos can do the same, where the peers are manually set up, or via. tailscale etc. I then tell k3s that it should use the wireguard interface for vxlan, and boom my kubernetes mesh is now connected.

flannel-iface: "wg0" # Talos might have something similar.

I do use some node-labels and affinities to make sure the right pods end up in the right spot. For example the metallb annoucer always has to come from the hetzner node. As mentioned in my reply below, it takes about 20ms roundtrip back to my homelab, so my sites can take a bit of time to load, but it works pretty well otherwise, sort of similar to how cloudflare tunnels would work, except not as polished.

My setup is here if it is of help

https://git.kjuulh.io/kjuulh/clank-homelab-flux/src/branch/m...

dietr1ch•42m ago
Is this your use case?

https://docs.zerotier.com/bridging/

viraptor•39m ago
ZeroTier does L2.
H8crilA•45m ago
Not sure I understand, but why not Tailscale?
sy26•34m ago
In my case, Tailscale does not implement K8S CNI.
notepad0x90•39m ago
For site-so-site ovelay networks, use wireguard, vxlan should be inside of it, if at all. Your "network" is connected by wireguard, and it contains details like vxlan. Even within your network, when crossing security boundaries across untrusted channels, you can use wireguard.

Others mentioned tailscale, it's cool and all but you don't always need it.

As far as security, that's not even the consideration I had in mind, sure wireguard is secure, but that's not why you should have vxlan inside it, you should do so because that's the purpose of wireguard, to connect networks securely across security/trust boundaries. it doesn't even matter if the other protocol is also wireguard, or ssh or whatever, if it is an option, wireguard is always the outermost protocol, if not then ipsec, openvpn,softether,etc..whatever is your choice of secure overlay network protocol gets to be the tunnel protocol.

iscoelho•19m ago
VXLAN over WireGuard is acceptable if you require a shared L2 boundary.

IPSec over VXLAN is what I recommend if you are doing 10G or above. There is a much higher performance ceiling than WireGuard with IPSec via hardware firewalls. WireGuard is comparatively quite slow performance-wise. Noting Tailscale, since it has been mentioned, has comparatively extremely slow performance.

edit: I'm noticing that a lot of the other replies in this thread are not from network engineers. Among network engineers WireGuard is not very popular due to performance & absence of vendor support. Among software engineers, it is very popular due to ease of use.

jrm4•17m ago
Whenever I see threads like this, I think its related but I'll be honest, my networking understanding might be limited.

I use Tinc as a daily driver (for personal things) and have yet to come up with a new equivalent, given that I probably should. Does Vxlan help here?

iscoelho•16m ago
VXLAN is for L2 between campuses. It is commonly used in enterprise networks.
denkmoon•15m ago
Not super related to the OP but since we're discussing network topologies; I've recently had an insane idea that nfs security sucks, nfs traversing firewalls sucks, kerberos really sucks, and that just wrapping it all in a wireguard pipe is way better.

How deranged would it be to have every nfs client establish a wireguard tunnel and only have nfs traffic go through the tunnel?

sciencesama•12m ago
vxlan inception is fun ! said no one ever !

We can't have nice things because of AI scrapers

https://blog.metabrainz.org/2025/12/11/we-cant-have-nice-things-because-of-ai-scrapers/
105•LorenDB•1h ago•64 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
67•evakhoury•6h ago•10 comments

The Tulip Creative Computer

https://github.com/shorepine/tulipcc
167•apitman•6h ago•35 comments

Show HN: Nogic – VS Code extension that visualizes your codebase as a graph

https://marketplace.visualstudio.com/items?itemName=Nogic.nogic
48•davelradindra•4h ago•18 comments

Let's be honest, Generative AI isn't going all that well

https://garymarcus.substack.com/p/lets-be-honest-generative-ai-isnt
48•7777777phil•4h ago•19 comments

Open sourcing Dicer: Databricks's auto-sharder

https://www.databricks.com/blog/open-sourcing-dicer-databricks-auto-sharder
40•vivek-jain•3h ago•6 comments

Choosing learning over autopilot

https://anniecherkaev.com/choosing-learning-over-autopilot
30•evakhoury•4h ago•21 comments

How to make a damn website (2024)

https://lmnt.me/blog/how-to-make-a-damn-website.html
105•birdculture•5h ago•37 comments

Running Lean at Scale

https://harmonic.fun/news#blog-post-lean
31•eab-•1h ago•2 comments

Scott Adams has died

https://www.youtube.com/watch?v=Rs_JrOIo3SE
631•ekianjo•7h ago•1064 comments

AI Generated Music Barred from Bandcamp

https://old.reddit.com/r/BandCamp/comments/1qbw8ba/ai_generated_music_on_bandcamp/
483•cdrnsf•4h ago•391 comments

Why Real Life is better than IRC (2000)

https://everything2.com/node/e2node/Why%20Real%20Life%20is%20better%20than%20IRC
28•themaxdavitt•4d ago•29 comments

Ask HN: Vxlan over WireGuard or WireGuard over Vxlan?

30•mlhpdx•3h ago•37 comments

Inlining – The Ultimate Optimisation

https://xania.org/202512/17-inlining-the-ultimate-optimisation
35•PaulHoule•4d ago•14 comments

Show HN: Ayder – HTTP-native durable event log written in C (curl as client)

https://github.com/A1darbek/ayder
46•Aydarbek•5h ago•22 comments

LANL's ICE House Tests Microelectronics for Cosmic Radiation Exposure

https://www.lanl.gov/media/publications/1663/ice-house-heats-up
9•LAsteNERD•5d ago•2 comments

Legion Health (YC S21) Hiring Cracked Founding Eng for AI-Native Ops

https://jobs.ashbyhq.com/legionhealth/ffdd2b52-eb21-489e-b124-3c0804231424
1•ympatel•6h ago

Going for Gold: The Story of the Golden Lego RCX and NXT

https://bricknerd.com/home/going-for-gold-the-story-of-the-golden-lego-rcx-and-nxt-9-9-21
26•kotaKat•4d ago•1 comments

Apple Creator Studio

https://www.apple.com/newsroom/2026/01/introducing-apple-creator-studio-an-inspiring-collection-o...
457•lemonlime227•8h ago•374 comments

Superhuman AI Exfiltrates Emails

https://www.promptarmor.com/resources/superhuman-ai-exfiltrates-emails
82•takira•1d ago•18 comments

Influencers and OnlyFans models are dominating U.S. O-1 visa requests

https://www.theguardian.com/us-news/2026/jan/11/onlyfans-influencers-us-o-1-visa
311•bookofjoe•6h ago•223 comments

We rolled our own documentation site

https://blog.tangled.org/docs
29•nerdypepper•20h ago•19 comments

Games Workshop bans staff from using AI

https://www.ign.com/articles/warhammer-maker-games-workshop-bans-its-staff-from-using-ai-in-its-c...
180•jsheard•2h ago•96 comments

Git Rebase for the Terrified

https://www.brethorsting.com/blog/2026/01/git-rebase-for-the-terrified/
232•aaronbrethorst•6d ago•242 comments

Show HN: SnackBase – Open-source, GxP-compliant back end for Python teams

https://snackbase.dev
54•lalitgehani•10h ago•8 comments

Everything you never wanted to know about file locking (2010)

https://apenwarr.ca/log/20101213
69•SmartHypercube•5d ago•13 comments

Show HN: An iOS budget app I've been maintaining since 2011

https://primoco.me/en/
136•Priotecs•12h ago•56 comments

Ask HN: Discrepancy between Lichess and Stockfish

12•HNLurker2•3h ago•8 comments

Show HN: Self-host Reddit – 2.38B posts, works offline, yours forever

https://github.com/19-84/redd-archiver
180•19-84•7h ago•40 comments

Signal leaders warn agentic AI is an insecure, unreliable surveillance risk

https://coywolf.com/news/productivity/signal-president-and-vp-warn-agentic-ai-is-insecure-unrelia...
308•speckx•4h ago•93 comments