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

OpenVPN routing between two networks over tunnel

Scheduled Pinned Locked Moved OpenVPN
3 Posts 3 Posters 394 Views
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 Dec 19, 2020, 10:28 AM

    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!

    J V 2 Replies Last reply Dec 19, 2020, 11:48 AM Reply Quote 0
    • J
      JKnott @holly
      last edited by JKnott Dec 19, 2020, 3:30 PM Dec 19, 2020, 11:48 AM

      @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 Dec 19, 2020, 2:05 PM

        @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
        3 out of 3
        • First post
          3/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received