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

    Add a direct route to OpenVPN Server on client

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 476 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.
    • T
      tuwe9quoh3en
      last edited by

      Hi,
      I have a configuration where i want to create a VPN Tunnel to the WAN Interface of OpenVPN.
      Example:
      WAN Network: 1.1.1.0/24
      PfSense IP: 1.1.1.10
      If i now export the 1.1.1.0/24 as a Local Network in the OpenVPN configuration the routing table on a client looks like:

      default via 192.168.1.1 dev eth0
      1.1.1.0/24 via 172.16.10.1 dev tun0
      

      Now OpenVPN tries to reach the OpenVPN Server 1.1.1.10 through tun0 which is not working, because the packages are routed in a circle.
      Because of that i have to add a direct route to the VPN Server:

      ip route add 1.1.1.10/32 via 192.168.1.1 dev eth0
      

      After this the routing table looks correct:

      default via 192.168.1.1 dev eth0
      1.1.1.10/32 via 192.168.1.1 dev eth0
      1.1.1.0/24 via 172.16.10.1 dev tun0
      

      and everything is working.

      Is there a way to tell OpenVPN/PfSense to add the direct route to the VPN Server 1.1.1.10 when it's connecting?
      For me this sounds like a easy to solve and common problem, but by now i was not able to find a solution. 😞
      Thank you for your help.

      M 1 Reply Last reply Reply Quote 0
      • M
        marvosa @tuwe9quoh3en
        last edited by marvosa

        Can you provide more context on the problem and the proposed solution?

        T 1 Reply Last reply Reply Quote 0
        • T
          tuwe9quoh3en @marvosa
          last edited by tuwe9quoh3en

          @marvosa
          I'm sorry, but i don't know exactly what you mean.
          If I want to make the WAN Network accessible trough VPN, where the OpenVPN Service is listen, this is currently not possible.
          Other OpenVPN Implementations (e.g. untangle) add a direct route to the OpenVPN Server to solve the Problem. I think this should also be possible on PfSense, but i don't know how.. :(
          If you need more information, i can provide them to you.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.