I'm trying to setup a reverse VPN tunnel to allow the VPN server access to the VPN client network
Here's my setup:
I have an OpenVPN setup with a public VPS server
I have a VPN client on a 192.168.1.x LAN
Tunnel subnet is 10.8.0.0
Here's where I am:
OpenVPN Server - public-facing/VPS server
VPS server interface (ens192)
VPN Server tunnel ip 10.8.0.1 (tun0)
OpenVPN Client on internal LAN device - RaspberryPi
LAN IP 192.168.1.72 (enxb827ebbfc12c)
VPN tunnel ip 10.8.0.12 (tun0)
The server and client certs are good and the tunnel negotiation works fine.
The VPN client can route through the VPS Server and can PING:
VPN server (tunnel & public IPs)
Internet addresses (IP & DNS)
LAN (192.168.1.x) clients
Here's what's NOT working:
The VPN server CANNOT PING the VPN client or any devices on the client LAN (192.168.1.x)
A traceroute shows the request gets to the client (10.8.0.12) and stops there
IPv4 packet forwarding is enabled on both VPN server and client
/etc/sysctl.conf ---> net.ipv4.ip_forward=1
I've read the following article and configured it as described (I think):
https://openvpn.net/community-resources/how-to/#scope
The only part I'm wondering about is this:
"The last step, and one that is often forgotten, is to add a route to the server’s LAN gateway (10.8.0.0) which directs 192.168.1.0/24 to the OpenVPN server box (you won’t need this if the OpenVPN server box is the gateway for the server LAN). Suppose you were missing this step and you tried to ping a machine (not the OpenVPN server itself) on the server LAN from 192.168.4.8? The outgoing ping would probably reach the machine, but then it wouldn’t know how to route the ping reply, because it would have no idea how to reach 192.168.4.0/24. The rule of thumb to use is that when routing entire LANs through the VPN (when the VPN server is not the same machine as the LAN gateway), make sure that the gateway for the LAN routes all VPN subnets to the VPN server machine.
Similarly, if the client machine running OpenVPN is not also the gateway for the client LAN, then the gateway for the client LAN must have a route which directs all subnets which should be reachable through the VPN to the OpenVPN client machine."
Questions
- Do I need to configure the VPN client (RaspberryPi) for routing and/or iptables?
- Do I need to configure anything on my LAN router (192.168.1.1)?
- I haven't configured promiscuous mode on anything- is this needed?
Many thanks in advance- I'd really like to get this working.