I got the following scenario:
an ubuntu server 20.04 lts, for simplicity named A server with the following network interfaces:
- loopback
- enp1s0 (wan) PUBLIC-IP/23
- enp8s0 (lan) 10.9.96.3/20
- ppp0 (l2tp) 192.168.42.1
with this routing table (public routes are intentionally omitted):
- 10.9.96.0/20 dev enp8s0 proto kernel scope link src 10.9.96.3
- 192.168.1.0/24 via 192.168.42.10 dev ppp0
- 192.168.42.10 dev ppp0 proto kernel scope link src 192.168.42.1
There's a remote vpn client connected with ip 192.168.42.10.
This client is a MikroTik router providing the remote lan network 192.168.1.0/24
Using the static route added by me (192.168.1.0/24 via 192.168.42.10 dev ppp0) I am able to reach out 192.168.1.0/24 devices.
another ubuntu server 20.04 lts, for simplicity named B server with the following network interfaces:
- loopback
- enp1s0 (wan) PUBLIC-IP/23
- enp8s0 (lan) 10.9.96.4/20
and this routing table (public routes are intentionally omitted):
- 10.9.96.0/20 dev enp8s0 proto kernel scope link src 10.9.96.4
Basically I need to access 192.168.1.0/24 devices from server B but I cannot make it work.
I've also tried to add a static route: 192.168.1.0/24 via 10.9.96.3 dev enp8s0
within this server without success, I see packets destined to 192.168.1.X reaching out server A but then they are not forwarded to ppp0 interface I guess (so I've tried also some iptables rules)
How to fix this issue?
Firewall is disabled in both servers.