Letting OpenVPN subnet see my LAN
Posted: Wed May 22, 2019 11:01 pm
I have set up OpenVPN on my Pi3 running Stretch, in tunneling mode, on my LAN, and can access it remotely (e.g., from my iPhone). The VPN connection gets an address assigned to it from the subnet I configured within server.conf (192.168.5.0/24, in my case). The Pi also runs dnsmasq for my LAN. The LAN subnet is 192.168.1.0/24. The Pi's eth0 address is fixed at 192.168.1.5.
What's confusing me is that I if I try to use, say, RD Client to access one of the machines on my LAN from my iPhone while the VPN connection is live, it fails because it can't find the target machine. Yet if I use something like Telnet Lite to make a terminal connection to the Pi by specifying an IP address (rather than a host name), >>that<< succeeds, no problem. It seems like the VPN connection isn't accessing the dnsmasq service running on the Pi.
I thought I could resolve this by adding the following to the openvpn server.conf file:
but that didn't work (same problem).
How do I configure things to give the VPN connections full bidirectional access to the LAN?
What's confusing me is that I if I try to use, say, RD Client to access one of the machines on my LAN from my iPhone while the VPN connection is live, it fails because it can't find the target machine. Yet if I use something like Telnet Lite to make a terminal connection to the Pi by specifying an IP address (rather than a host name), >>that<< succeeds, no problem. It seems like the VPN connection isn't accessing the dnsmasq service running on the Pi.
I thought I could resolve this by adding the following to the openvpn server.conf file:
Code: Select all
push "route 192.168.1.0 255.255.255.0 192.168.1.254"
push "dhcp-option DNS 192.168.1.5"
How do I configure things to give the VPN connections full bidirectional access to the LAN?