I have the following setup:
Physical router
- Internet interface 192.168.1.1
- Port forwarding of IP 1194/udp to virtual machine below
Virtual machine (VM)
- Ubuntu 14.04.3 Server AMD64
- One virtual NIC that bridges (shares transparently) my host's physical NIC
- Static lease (192.168.1.58) assigned by physical router
- OpenVPN installed and configured; virtual interface tun0 with IP 10.8.0.1 (followed guide https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-14-04)
Successful:
- My laptop can connect and get an IP 10.8.0.x
- My laptop can ping internal devices
Not successful:
- Internal devices cannot ping 10.8.0.x
- They cannot even ping 10.8.0.1 which is the tun0 interface
So routing is working from 10.8.0.x > 10.8.0.1 > 192.168.1.58 > 192.168.1.1 > 192.168.1.x ... but routing is NOT working the opposite direction!
I added a route in my physical router (using DD-WRT v24-sp2):
- Destination LAN NET: 10.8.0.0
- Subnet Mask: 255.255.255.0
- Gateway: 192.168.1.58
- Interface: LAN & WLAN
But routing is still not working to the 10.8.0.0 network. I suspect the issue lies with my Ubuntu server that is running OpenVPN. I suspect the issue is that while the article above gave a step to setup routing from 10.8.0.0 to the internal network, it didn't include a step from the internal network to 10.8.0.0. So maybe I just need to add a rule that facilitates this? I'm thinking in iptables, but I also use UFW; so I don't know how to do that.
Thanks!