Wireguard POINTTOPOINT Interface

Does Wireguard no longer support POINTTOPOINT interfaces configurations? I was able to do this in the past and revisiting the setup I can't seem to replicate what I did before. I've read this post on the Wireguard mailing list regarding the FreeBSD port and it does mention:

* if_wg: set multicast flag

Following extensive discussion [1] with Stefan Haller and Toke Høiland-
Jørgensen, the IFF_MULTICAST option is now set on the interface, so that bird
can send packets using babel. It turns out that FreeBSD forbids v6 multicast
address destinations, even when used in a unicast context, if this flag isn't
set, which differs from Linux semantics. This patch combined with [2] from
Toke to upstream bird will allow WireGuard to work with bird as it did when we
previously used IFF_POINTTOPOINT (which had its own problems). I sent a patch
to the FreeBSD port of bird here [3] so that hopefully if_wg is functional
with bird and babel not before too long.

Based on this I am wondering if this means I cannot configure point-to-point addressing on wg interfaces anymore?
I am running FreeBSD 12.2 with:
  • wireguard-kmod-0.0.20210606_1
  • wireguard-tools-1.0.20210914
I've tried various versions of the following to no avail:
Code:
ifconfig wg0 inet A.A.A.A/32 B.B.B.B/32

I can work around the problem with:
Code:
route add -inet B.B.B.B/32 -interface wg0

However, this breaks a specific use case. My issue originally arose because I am trying to establish an eBGP session over a Wireguard tunnel. BGP will not accept the peer because it doesn't consider the peer as directly connected. The only way to establish the peering is to configure the peer as eBGP multihop. This works but it is not how I was originally setting up my peers when attempting this over Wireguard on FreeBSD in the past.

Thanks in advance.
 
Try to use wg go implementation except kernel implementation

1) remove kernel implementation :
pkg remove net/wireguard-kmod

2) install go user-mod implementation
pkg install net/wireguard-go

configure
Code:
/usr/local/etc/wireguard/wg0.conf
and make your wg tunnel up/down using wg-quick up wg0

This is just example it will bring up automatically

Code:
/usr/local/etc/wireguard/wg0.conf
[#] wireguard-go wg0
INFO: (wg0) 2021/11/13 16:18:22 Starting wireguard-go version 0.0.20200320
[#] wg setconf wg0 /tmp/tmp.9I0Tr6IA/sh-np.sDyOmF
[#] ifconfig wg0 inet 172.16.16.1/24 172.16.16.1 alias
[#] ifconfig wg0 mtu 1420
[#] ifconfig wg0 up
[#] route -q -n add -inet 172.16.16.34/32 -interface wg0
[#] route -q -n add -inet 172.16.16.12/32 -interface wg0
[#] route -q -n add -inet 172.16.16.10/32 -interface wg0
[+] Backgrounding route monitor

Note: I had problem with FreeBSD 12.2 STABLE with combining wg and others so iswitched to FreeBSD 13.0 Stable now works fine
 
I'm afraid the problem would still exist. The issue is with configuring the route as an interface route. BGP will not consider the neighbour as being "directly connected". Whereas before I was sure Wireguard interfaces were POINTTOPOINT and I could configure them as "ifconfig wg0 local_ip remote_ip". Wireguard is working fine but how I configure the interface differs to what I think I remember.
 
Back
Top