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

    How to redirect public traffic to openvpn connected client

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 720 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.
    • N Offline
      norbi771
      last edited by

      Hello Community!

      I have pfsense router in datacenter and some static IPs available.
      I have FreeBSD host somwhere in the Internet, behind a NAT, that establishes connection via openvpn to my PFSense router.
      If I establish another VPN connection I can reach that FreeBSD host over vpn tunnel via 10.0.6.250 IP (static assignment).

      I'd like to start web server on the FreeBSD host (running OpenVPN client) and have this web server visible via the IP of the pf sense router from the Internet side. I thought I could achieve that by NAT port forward on pfsense, forwarding port eg. 80 to the vpn client IP address 10.0.6.250, but it doesn't work and I don't know how to fix that.

      Could you point me to the right direction?
      I will appreciate any help in configuring that.

      Thank you

      Norbert

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

        In addition to the port forwarding you will need an outbound NAT rule for the OpenVPN interface.
        In Firewall: NAT: Outbound try to add a rule like this:
        Interface=OpenVPN, Source=any, Destination=any (or your vpn clients IP), Translation=Interface address

        1 Reply Last reply Reply Quote 0
        • N Offline
          norbi771
          last edited by

          It worked, after I restarted the pfsense box.

          Thank you :-)

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