Bind wiregard interface to VRF

From: Ben Greear
Date: Sun Nov 17 2024 - 15:53:02 EST


Hello,

I am interested in binding wireguard interface to a VRF.

I was thinking the parentdev option in 'ip link add' logic could be used to
set the bind_ifindex in the 'struct udp_port_cfg' object. I didn't fully follow
this through to see if it could work, but it seems likely.

Something like:

ip link add wg1 type wireguard parentdev vrf1


I think as long as the UDP socket is created/bound with something similar to how
user-space applications often support --interface eth1 argument, then it would do
what I want.

I'm curious if there has been any effort in this direction or if anyone has suggestions
for most acceptable path forward.

Thanks,
Ben

--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc http://www.candelatech.com