Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    OpenVPN routing between two networks over tunnel

    OpenVPN
    3
    3
    118
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      holly last edited by

      Hello Netgatecommunity!

      I started using pfSense and OpenVPN about a year ago without any problems.

      Now I need a remote-device, which doesn’t support OpenVPN natively, to access a lokal server. The first thing that came to mind was to use a Rpi Gateway with the OVPN-Client installed.
      Already looked for similar setups to use as a template but couldn’t figure out how and where I need to set the routes.

      Net.ipv4.ip_forward = 1 is activated on the Pi.

      Below a sketch of my Setup:
      netdiag1.png

      Device (192.168.178.52) needs to be able to communicate with ServerPC (192.168.1.250)

      Any help or pointers to fitting resources would be highly appreciated!

      JKnott V 2 Replies Last reply Reply Quote 0
      • JKnott
        JKnott @holly last edited by JKnott

        @holly

        The first thing to remember is this is just a routing problem. That one route is over a VPN is irrelevant. So, that means you need something that you can terminate OpenVPN on and then route through it. Once the VPN, is up, it becomes irrelevant to your problem. I assume your VPN terminates on that Rasberry Pi, so it has to be able to route beyond it's local connection through that Fritzbox and on to the device. Are both the Pi and Fritzbox capable of routing beyond the local connection? Pfsense certainly is.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • V
          viragomann @holly last edited by

          @holly
          Apart from the routes within OpenVPN, wich you may have already set, you need a route on the device 192.168.178.52 for 192.168.1.250 pointing to 192.168.178.51 (the RPi).

          1 Reply Last reply Reply Quote 0
          • First post
            Last post