Hi Everyone,
I'm having some trouble getting dynamic routing working over a Wireguard tunnel. No matter what I do, the devices will not see each other as OSPF neighbors. tcpdump shows no OSPF traffic of any kind on either router. Alongside OSPF, I have BIRD configured to add a static route to the Wireguard tunnel as a bootstrap, and this does work. The Wireguard tunnel is up and I can pass traffic through it as expected using the route added by BIRD. I can't figure out where the problem is as I'm not familiar enough with OSPF, BIRD, and nftables to properly debug it (which is why I am attempting this, hoping I'll learn more about these things).
Before I attempted this, I got BIRD set up and working between 2 laptops running Alpine with an almost identical config (including Wireguard) and it works, but I cannot reproduce this behavior under OpenWRT. Only major difference is nftables was not enabled on the laptops. Hoping I just made a dumb mistake somewhere and just need another set of eyes. Update: This is wrong, and I am dumb.
Thanks in advance,
--tyami94
Below are snippets of the relevant config files. Both devices are set up near identically.
Router 1
- /etc/bird.conf
router id 10.0.0.1;
debug protocols all;
protocol device {
}
#Initial route to bootstrap OSPF
protocol static bootstrap {
ipv6;
route fde0:690a:be3e::/48 via "sitetosite";
}
protocol direct self {
ipv6;
interface "sitetosite";
}
protocol kernel {
ipv6 {
export filter {
if proto = "self" then reject; #Do not add our own IP to the FIB
accept;
};
};
}
protocol ospf v3 ospf1 {
ipv6 {
export all;
};
area 0 {
interface "sitetosite" {
type ptmp;
neighbors {
fde0:690a:be3e::1;
};
};
};
}
- /etc/config/firewall (partial)
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
---SNIPPED---
config zone
option name 'sitetosite'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'sitetosite'
option log '1'
option log_limit '10/minute'
config rule
option name 'Allow-Wireguard-Site-to-Site-In'
list proto 'udp'
option src '*'
option dest_port '51821'
option target 'ACCEPT'
config rule
option name 'Allow-OSPF-In'
list proto 'ospf'
option src 'sitetosite'
option target 'ACCEPT'
option family 'ipv6'
config rule
option name 'Allow-OSPF-Out'
list proto 'ospf'
option dest 'sitetosite'
option target 'ACCEPT'
option family 'ipv6'
- /etc/config/network (partial)
config interface 'sitetosite'
option proto 'wireguard'
option private_key '<Redacted>'
option listen_port '51821'
list addresses 'fde0:690a:be3e::'
option defaultroute '0'
option delegate '0'
option nohostroute '1'
config wireguard_sitetosite
option description 'Router2'
option public_key '<Redacted>'
option preshared_key '<Redacted>'
option endpoint_host '<Redacted>'
option endpoint_port '51821'
option persistent_keepalive '25'
list allowed_ips '::/0'
list allowed_ips '0.0.0.0/0'
Router 2
- /etc/bird.conf
router id 10.2.0.1;
debug protocols all;
protocol device {
}
#Initial route to bootstrap OSPF
protocol static bootstrap {
ipv6;
route fde0:690a:be3e::/48 via "sitetosite";
}
protocol direct self {
ipv6;
interface "sitetosite";
}
protocol kernel {
ipv6 {
export filter {
if proto = "self" then reject; #Do not add our own IP to the FIB
accept;
};
};
}
protocol ospf v3 ospf1 {
ipv6 {
export all;
};
area 0 {
interface "sitetosite" {
type ptmp;
neighbors {
fde0:690a:be3e::;
};
};
};
}
- /etc/config/firewall (partial)
config defaults
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'sitetosite'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'sitetosite'
config rule
option name 'Allow-Wireguard-Site-to-Site-In'
list proto 'udp'
option src '*'
option dest_port '51821'
option target 'ACCEPT'
config rule
option name 'Allow-OSPF-In'
list proto 'ospf'
option src 'sitetosite'
option target 'ACCEPT'
option family 'ipv6'
config rule
option name 'Allow-OSPF-Out'
list proto 'ospf'
option dest 'sitetosite'
option target 'ACCEPT'
option family 'ipv6'
- /etc/config/network (partial)
config interface 'sitetosite'
option proto 'wireguard'
option private_key '<Redacted>'
option listen_port '51821'
list addresses 'fde0:690a:be3e::1'
option defaultroute '0'
option delegate '0'
option nohostroute '1'
config wireguard_sitetosite
option description 'Router1'
option public_key '<Redacted>'
option preshared_key '<Redacted>'
option endpoint_host '<Redacted>'
option endpoint_port '51821'
option persistent_keepalive '25'
list allowed_ips '::/0'
list allowed_ips '0.0.0.0/0'