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

    Masquerede connection via OpenVpn

    Scheduled Pinned Locked Moved NAT
    3 Posts 2 Posters 415 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.
    • A
      andmattia
      last edited by

      I've a remote site that accpet traffic only from my static address. On my pfsense LAN all works fine but if I try from my home, via OpenVpn connection I can't.

      In my openVpn config I push a route to a specific ip and on pfsense side I see that traffic flow from my laptop throw pfsense but the ip used to connect on remote side it's the openVpn ip and not External gateway.

      I try to reproduce the schema:
      external IP 1.2.3.4
      LAN 192.168.1.0/24
      OpenVPNLan 192.168.2.0/24
      remote IP 1.1.2.2

      If I try to connect from LAN on firewall i see a connection like
      1.2.3.4 -> 1.1.2.2

      If I try from laptop via openVpn
      192.168.2.1 > 1.1.2.2

      My goal is to "masqureade" 192.168.2.x to my external IP 1.2.3.4

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

        @andmattia
        Go to Firewall > NAT > Outbound.
        If it's in automatic mode, switch over to hybrid mode and save it.
        Then add a new rule:
        interface: WAN
        source: 192.168.2.0/24
        destination: any
        translation: interface address

        A 1 Reply Last reply Reply Quote 1
        • A
          andmattia @viragomann
          last edited by

          @viragomann thanks a lot it works!

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