I've been trying to solve this problem for a very long time. The situation is as follows:
Computer(s) -> Huawei B525 router -> VPS with xl2tpd -> Internet
I have a Huawei B525 router. It has enabled a DHCP server that assigns IP addresess from 192.168.8.0/24 network. I also have a VPN (L2TP) installed on VPS.
After connecting the Huawei router to VPN it has an IP address 192.168.42.10. Gateway has an IP address 192.168.42.1 (so as expected). The internet works fine, devices behind Huawei router can ping other devices connected to the VPN. But I don't have access to mentioned machines (behind the router) from other devices, ex. also connected to VPN (or from VPS itself).
The perfect solution would be access to 192.168.8.0/24 devices and it's ports from VPS and other VPN devices.
Route print:
Iptables - filter:
Iptables - nat: