Hi,
I want to setup a site2site vpn from one PiVPN to another PiVPN installation.
Site 1: 192.168.1.0/24
Site 2: 192.168.0.0/24
I want to have access from all Clients in Site 1 to all Clients in Site 2.
Therefore I have setup a PiVPN Installation in each Site.
In Site 2 I was adding the Server-Config. I copied the Config to Site 1 and enabled there the config.
So far it is working, but I have one small issue.
In Site 1 I have "tun0" which was autogenerated by PiVPN and "tun1" which was created by my Client Config.
The route for 192.168.0.1 is pointing to "tun0" which is wrong. It needs to point to "tun1".
If I run the following command, then everything is working:
sudo ip route del 192.168.0.0/24 via 10.8.0.1 dev tun0
sudo ip route add 192.168.0.0/24 via 10.8.0.4 dev tun1
But after some time this is reverted back to tun0. What do I need to add to the OpenVPN Client (or Server) Config to get this route pointing permanently to "tun1"?
Br,
Johannes