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

    Port forward over IPsec VPN

    Scheduled Pinned Locked Moved NAT
    4 Posts 4 Posters 1.5k 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.
    • R
      russs99
      last edited by

      Hi

      I have 2 sites which have an IPsec VPN between them which works fine, routing between the sites OK. I am trying to create a port forward from Site 1 to a machine in Site 2 (port 80), to enable it to be accessed through the public IP of site 1. Can anyone please assist, I have tried creating port forwarding rules and outbound NAT rules to no avail..

      Thanks

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

        Hi russ,

        I'm not sure to understand what you are trying to do but I think you should look at a diffrent aproach.

        I think your best approach should be to use public IP address on site 2 instead of using NAT through IPSec.

        By design, your traffic will not be able to reach your computer at site 2 and go back to your client that used the internet from site 1.  Traffic on the way back from your computer to the client will go out to internet at site 2 instead of using site 1 public IP address.

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

          You can do that with OpenVPN but I'm pretty sure you can't do it with IPSec.

          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
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            It can be possible with IPsec but you have to force all traffic to/from the target box over IPsec. For example, on the side receiving the Internet traffic, you'd have a P2 for 0.0.0.0/0 to the NAT target (e.g. 10.0.0.5) and then on the other side you'd have a P2 for 10.0.0.5 to 0.0.0.0/0. So all traffic to/from the Internet on 10.0.0.5 must go over IPsec, which is not ideal.

            OpenVPN can do this in a much more flexible way without that requirement.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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