I have 2 raspberry pi machines

RP1 - connects to my home network using Softether (For remote access) RP2 - connects to an external VPN (ExpressVPN) diagram

If I use the IP address of RP2 ( as a gateway for my local devices it works, it also works on RP2 within the local network.

However I cannot connect remotely (work or mobile network) to RP1 unless RP2 openvpn is off. Both are running on Rasbian stretch and work fine except when I try to connect to my vpn network.

I expect once I connect to the VPN on RP1 it should use the gateway ( instead of the default one ( which I set in /etc/dhcpcd.conf

RP1 is using softether and on a virtualdhcp in 192.168.30.XX subnet when I’m connected, otherwise the IP address is

Appreciate your inputs and help.

  • I do not understand what you mean. Can you please provide a diagram of your network setup? What is Softether and a virtualdhcp?
    – Ingo
    Feb 12, 2019 at 14:58
  • I don’t have s diagram but both raspberry pi’s connect to my main router, when I use the IP address of the vpn gateway running openvpn it works on all devices except when I connect remotely to another raspberry pi using vpn. If i stop openvpn i can connect remotely.
    – MTSOP
    Feb 12, 2019 at 15:03
  • I've thought you just paint a picture on a sheet of paper, take a photo of it and link to the photo in your question. Or you may use drawing software. Do you have two openvpn tunnel, one outgoing with one RasPi and one incomming with a second RasPi?
    – Ingo
    Feb 12, 2019 at 15:14
  • I added an image, the outgoing vpn is OpenVPN, the incoming one uses SoftEther using this guide: curlybrac.es/2016/11/22/set-up-vpn-server-on-raspberry-pi
    – MTSOP
    Feb 12, 2019 at 15:32
  • +1 That makes everything clear. But before spending effort to the answer I would ask if you could also accept a different solution using systemd-networkd? I think here are to much different components that must fit together and dhcpcd is not the best solution for sophisticated configurations. I only had a glance at Softether: tldr. I just assume it's a remote VPN server that we can connect to as openVPN client.
    – Ingo
    Feb 12, 2019 at 20:28


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.