Routing between networks works except one host

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
silent9
OpenVpn Newbie
Posts: 1
Joined: Thu Jul 28, 2022 6:04 pm

Routing between networks works except one host

Post by silent9 » Thu Jul 28, 2022 6:57 pm

Hello.
I have an interesting puzzle to solve. I have a small network (10.10.1.0/24) with main router (10.10.1.1) and a server (10.10.1.5, currently QNAP NAS) running a couple of services and OpenVPN 2.4 instance. There is also an extra host (10.10.1.2) running L2TP client as a gateway to remote network 10.10.3.0/24 (static route to .3.0 via .1.2 is configured on .1.1 router). OpenVPN server on .1.5 host is running in TUN mode (10.10.2.0/24, tun0 has 10.10.2.1) and every CN as a static IP assigned in 10.10.2.0/24 using CCD feature. I want to be able to reach any device in any subnet to any subnet. OpenVPN config looks like this:

Code: Select all

dev tun0
server 10.10.2.0 255.255.255.0
;route 10.10.2.0 255.255.255.0

push "route 10.10.1.0 255.255.255.0"
push "route 10.10.2.0 255.255.255.0"
push "route 10.10.3.0 255.255.255.0"
It works, I can see all devices from all networks, except one case - clients in VPN network (10.10.2.x) cannot reach VPN server by its main subnet address 10.10.1.5. It's reachable by its .2.0 subnet address (10.10.2.1) and anything in 10.10.1.0 is also reachable from .2.0 subnet except 10.10.1.5. Why is it so?

I have tried purging iptables without success.

Code: Select all

iptables -F
iptables -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
Do you have any idea why the server's second address is not reachable from VPN network or hot to diagnose that?

Post Reply