Simple VPN routing question

NethServer Version: 7.7.1908
Module: OpenVPN

I think this is a simple question but I have gotten lost following all the VPN topics. I have set up the RoadWarrior and have connected my iPhone to it whilst on 4G. The iPhone has the address 192.168.101.6 and if can browse the nethserver box at 192.168.101.1. However, I want to use the VPN so I can connect to my internal network which is 192.168.178.x, which is the network that the nethserver box is plugged into on its only NIC which is a LAN (green) connection. So from my iPhone, I can’t access any 192.168.178.x address. How do I set up this routing?

Many thanks

Andrew

You need to add a static route between the 2 subnets.
I might be wrong, but I always thought this was added automagically when you configure nethserver-VPN module…
Anyone with more (handson) knowledge can confirm this?

In the Network tool, my routing table says

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.178.1   0.0.0.0         UG    0      0        0 br0
192.168.101.0   192.168.101.2   255.255.255.0   UG    0      0        0 tunrw
192.168.101.2   0.0.0.0         255.255.255.255 UH    0      0        0 tunrw
192.168.178.0   0.0.0.0         255.255.255.0   U     0      0        0 br0

Routing tables aren’t my strong suit, so not sure if this is sufficient. Note that I haven’t tried to change anything; this is what nethserver set up.

When the Nethserver is not the gateway you need to setup a static route on your gateway (192.168.178.1) to route the VPN network to the Nethserver.

See also:

That’s true but only for the Nethserver itself.

1 Like

Many thanks for everyone’s help - I hadn’t realised that I needed to set a static route on my own router. Popped that into my Fritz!Box and all is well.

2 Likes