Hello, I am playing with netbird trying to create a “site-2-site” vpn.
This “second site” is machine that will be placed to my brother’s house so we will have access to shared services and get the offsite backup.
As said, I am testing it, but everytime I enable netbird on the secondary homelab the network crashes.
For unknown reason, the default gateway is still there (I can ping it) but the route for internet becomes unknown.
If I trace example google.com the first hop is not the gateway 192.168.178.1 (I have replicate its network) but truenas 192.168.178.22…
The only way to restore everything is stop the container & reboot everything (vm & router).
On the primary everything works as expected.
These are some command I did when netbird was enabled:
root@pollon:/home/olimpo# ping 9.9.9.9
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.
^C
--- 9.9.9.9 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2054ms
root@pollon:/home/olimpo# ip route show
default via 192.168.178.1 dev enp6s18 onlink
10.0.20.0/24 dev enp6s19 proto kernel scope link src 10.0.20.23
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-143794984aa2 proto kernel scope link src 172.18.0.1
172.20.0.0/16 dev br-76f07613276d proto kernel scope link src 172.20.0.1 linkdown
172.21.0.0/16 dev br-d95b2ab635f9 proto kernel scope link src 172.21.0.1
192.168.178.0/24 dev enp6s18 proto kernel scope link src 192.168.178.23
olimpo@pollon:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp6s18
#iface enp6s18 inet dhcp
iface enp6s18 inet static
address 192.168.178.23/24
gateway 192.168.178.1
This is the compose I used (the same code works perfectly on the primary vm).
---
# -------------------------------------------------------
# servizi
# -------------------------------------------------------
services:
netbird:
image: netbirdio/netbird:latest
container_name: netbird
restart: unless-stopped
network_mode: "host"
security_opt:
- no-new-privileges:true
env_file: .env
volumes:
- /home/olimpo/docker_data/netbird/etc:/etc/netbird
environment:
NB_SETUP_KEY: ${CHIAVE}
cap_add:
- NET_ADMIN
to do the tests, I created a virtual pfsense connected to the primary pfsense like so.
the vlan 240 on the first, has completely access to internet and blocks other vlan access.
Other vlans cannot access to vlan 240.
I am not an expert so maybe this is the cause, but I don’t know why it crashes the network.
EDIT:
I am an idiot, a tired idiot… it is time to get a break and finish tomorrow.
Everything was right but the port on the switch wasn’t assigned to vlan 240 but my manangement…