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

    Port Redirect with Public WAN and LAN

    Scheduled Pinned Locked Moved NAT
    8 Posts 5 Posters 3.9k 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.
    • S
      silverwolf
      last edited by

      Hi,

      I have public ip's addresses on both WAN and LAN side. From there i want a rule that says:

      When connection is created to 123.123.123.123 port 26 on LAN from WAN, redirect it to 123.123.123.123 port 25 on LAN.

      I can't figure out how to set it up in NAT, as it only know how to forward when the lan is private.

      What can I do?

      Thanks

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

        In my understanding there shouldn't be any difference whether addresses on LAN side are "public" or "private". But from your description I don't understand whether the address 123.123.123.123 is on LAN or WAN side of your network.

        If the addresses on LAN are truly meant to be public, reachable-from-the-internet addresses, then why use NAT at all? NAT is, after all, meant to masquerade the internal network so that it appears from the outside as single (or in some cases multiple) public address(es).

        1 Reply Last reply Reply Quote 0
        • L
          leoalfa09
          last edited by

          Better use private ips in Lan because you gonna have some problems if you use public ranges

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            @leoalfa09:

            Better use private ips in Lan because you gonna have some problems if you use public ranges

            No, there are no problems using public IPs on the LAN.

            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
            • L
              leoalfa09
              last edited by

              But i experienced problems using NAT with a public range 168.132.20.0 in my lan, then i change to a private ip and NAT works

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                @leoalfa09:

                But i experienced problems using NAT with a public range 168.132.20.0 in my lan, then i change to a private ip and NAT works

                If you had problems with that scenario, you were doing something wrong. There is no difference in what IPs you use on the LAN side. You may have had overlapping subnets or some other routing problem โ€“ but it was not related to using public IPs and NAT at the same time.

                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
                • L
                  leoalfa09
                  last edited by

                  its nice to now that Thanks, maybe my problem with nat was other.

                  Thanks..

                  1 Reply Last reply Reply Quote 0
                  • C
                    cmb
                    last edited by

                    You can setup port forwards just the same with public on both sides, I've done that a few times where someone wanted to send port 26 to port 25 on a public IP inside the network. The external and internal IPs are the same, just set the ports appropriately. That won't impact anything other than the specified external port.

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