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

    Routing IP range through OpenVPN tunnel

    Routing and Multi WAN
    2
    2
    586
    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.
    • B
      b0xch
      last edited by

      Heyo!

      I want to route specific public IP ranges through a OpenVPN tunnel.

      My current Setup:

      OpenVPN Client 10.10.10.22 <-> OpenVPN Server (PfSense) 10.10.10.1 <-> OpenVPN Client 10.10.10.80
      All OpenVPN Clients can see each other.

      I want to do this (8.8.8.8 as example):
      OpenVPN Client 10.10.10.22 –-requests 8.8.8.8---> OpenVPN Server (PfSense) 10.10.10.1 ---redirects to-----> OpenVPN Client 10.10.10.80 --- pushes to WAN---> Internet 8.8.8.8

      My OpenVPN server pushes this:

      push "route 10.10.10.0 255.255.255.0";
      push "route 8.8.8.0 255.255.255.0";
      

      When I access 8.8.8.8 from 10.10.10.22, the connection to WAN is on the PfSense server. How can I achieve that the packets will leave on 10.10.10.80?

      Thanks! :)

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

        You may route this on pfSense to the client 10.10.10.80, but this route will be applied to any connection passing pfSense, also upstream from LAN hosts.

        In addition if 10.10.10.80 isn't a router itself with a public WAN address you either will need a route for 10.10.10.22 at the other side or do source NAT at the client for this connection.

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