Hello everyone,
I've been racking my brain on this issue for the last few days, trying to get my setup to work. I've tried searching around and have found a lot of information that I've tried, but have not found the solution yet.
Some preamble: I am using OpenVPN 2.3.13 with a CyberGhost account (using their certs, key file, and ovpn config file that I added an automatic user/pass entry to). Desktop listed below is a Windows 7 x64 Pro PC and the RaspPi below is running OSMC/Debian (Jessie).
- My network is setup as such:
- My modem/primary router is set to a gateway IP address of 172.16.0.1 with DHCP addresses set to begin at 172.16.10.x (I was originally using all static IP address and having the same issue)
- My desktop PC's wireless has a DHCP IP address of 172.16.10.2 (I am using DHCP reservation on the router instead of static IPs, currently, to see if it helps).
- My desktop PC is set to act as a secondary router, so its Ethernet NIC is set to act as a gateway with a static IP address of 172.17.0.1 (I originally tried having this network on 192.168.0.1, but read somewhere that OpenVPN shouldn't be set up with common IP addresses and wasn't sure if it would help my situation.) The desktop PC and anything that is using it as a gateway will naturally get its internet access via the PC's wireless connection back to the primary router.
- Behind the desktop PC/secondary router, I have one device: a RaspPi 2 running OSMC, which has a static IP address of 172.17.0.100, gateway 172.17.0.1.
- I have a static route of 172.17.0.0 255.255.0.0 172.16.10.2 set on the primary router, which works fine. (I have tried other forms of this static route, such as 172.17.0.1 255.255.0.0 [modem/router won't let me set it to 255.255.255.255 for single host] 172.16.10.2 and so on, but with no change)
My goal is to have OpenVPN/CyberGhost running on the desktop/secondary router, doing its VPN duties for any traffic that comes from or through the PC. The network itself, without OpenVPN, works flawlessly. I can ping to and from any of the devices on either network; most importantly, because of my static route set on the primary router, I can ping WAN addresses from the 172.17.0.100/RaspPi without any problems.
It is not until I activate OpenVPN, log in with the CyberGhost credentials, and get a 10.x.x.x IP address on the TAP adapter that I run into issues. The issue I am having is not being able to ping/access WAN addresses when OpenVPN is turned on. This was the same situation when I was using the CyberGhost client instead (which uses OpenVPN anyway, as far as I know).
While OpenVPN is connected to CyberGhost, I am able to ping all the devices on both networks (172.16.x.x and 172.17.x.x) without any issue, and while logged into the RaspPi via SSH, I can see that DNS is resolving, but only when I have the RaspPi set to use the primary router (172.16.0.1) as the DNS host; that is, if I set it to use Google DNS (8.8.8.8) or the Desktop/Secondary router (172.17.0.1), DNS does not resolve. When it is resolving; ping, nslookup, and dig all resolve. Looking at
tcpdump, it appears that the host is not replying or the replies are not getting back to the RaspPi. More importantly, the RaspPi does not have any internet access while OpenVPN is on. Running Microsoft Netmon on the deskptop while pinging on the RaspPi, I can see that the RaspPi is sending Echo Requests for the resolved hostname, but no echo replies.
I've done a number of things so far, including trying to set a route in the OpenVPN config (just gives me an error in the OpenVPN log and never connects, so I might be doing it wrong, but I've tried a number of different combinations). Firewall does not appear to be a factor here, as I have tested this will all firewalls (primary router/modem, windows firewall, and iptables [default set to allow all]) turned off. Does anyone have an clue what I could try next? Is this an issue with CyberGhost's service?
Any help is appreciated!