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

    Port forward to server over VPN tunnel

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 2 Posters 2.3k 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.
    • F
      fitzy89
      last edited by

      Hi all

      I've been looking to figure this out for a while, I've found a lot of information but found it uneasy to understand, either due to my knowledge level or the way it was described.

      I have relocated a server from Site A (home), to Site B (datacenter). Both sites are linked by a OpenVPN site to site tunnel, everything internal connects and works perfectly so there's no internal problems at all.

      My issue is that there are many external devices that need to communicate with this server through the WAN address of Site A, it would be extremely inconvenient to reconfigure all of those devices (vehicle trackers) as they are embedded units requiring reprogramming. How can I forward the port from Site A WAN, to the server at Site B?

      Both sites are running pfSense 2.2.5, one embedded install, one full install if it matters.

      Any advice appreciated.
      Kind regards
      Rob

      1 Reply Last reply Reply Quote 0
      • F
        fitzy89
        last edited by

        Ok that was quicker than before, I've been meaning to get this done for a few weeks now, looks like walking away and coming back to it another time has worked in this case.

        I found another thread which I hadn't seen last time which seems to be worded much better here: https://forum.pfsense.org/index.php?topic=58804.msg319587#msg319587

        For me, the one that may have fixed it is the following:

        Outbound NAT:                                                 
                 
        (this first rule has Do Not NAT checked)
        If            Source          Src. ports          Dest. addr          Dest. ports          NAT Addr          NAT Port          Description
        OpenVPN  remote              *                      *                      *                    *                      *              Do Not NAT
                      network                                                                                                                            for remote subnet
                      subnet                                                                                                                              across VPN
                      across
                      VPN

        I'll update this tomorrow once all the devices start reporting back to the server and see how it goes, the web interface of the server is accessible from WAN A so it's looking good so far.

        1 Reply Last reply Reply Quote 0
        • DerelictD
          Derelict LAYER 8 Netgate
          last edited by

          https://forum.pfsense.org/index.php?topic=82732.msg453269#msg453269

          Chattanooga, Tennessee, USA
          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
          Do Not Chat For Help! NO_WAN_EGRESS(TM)

          1 Reply Last reply Reply Quote 0
          • F
            fitzy89
            last edited by

            @Derelict:

            https://forum.pfsense.org/index.php?topic=82732.msg453269#msg453269

            Thanks Derelict this looks a lot easier to understand. Interestingly with my current setup (from my last post above), the TCP port 80 for the web interface works perfectly, but to the other ports is still getting 'lost' somewhere even though the rules are setup the same for each one. I'll work through your referenced post and report back my findings later on.

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