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

    CREATE NAT TO SAME PORT ON DIFFERENT SERVERS

    Scheduled Pinned Locked Moved NAT
    6 Posts 3 Posters 350 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 Former User
      last edited by

      Hi, i need help in a configuration i dont know how make this but the problem is this i have a antispam server (192.168.1.2) your ip public is 190.89.21.11 and have ssh port (22/tcp); also i have a mail server (192.168.1.3) your ip public is 190.89.21.12 and have the same ssh port (22/tcp), what is the rule that can allow conect two different server with the same port or only can change the port of one they

      GertjanG ? 2 Replies Last reply Reply Quote 0
      • GertjanG
        Gertjan @A Former User
        last edited by

        @klausneil said in CREATE NAT TO SAME PORT ON DIFFERENT SERVERS:

        190.89.21.1a

        should be a WAN interface "A" with its port 22 NAT rule to "192.168.1.2", port "22".
        190.89.21.1b should be another WAN interface "B" with its port 22 NAT rule to "192.168.1.3", port "22".

        This means that when you remotely connect to 190.89.21.1a on port 22, you wind up connecting to local server 192.168.1.2 - port 22.2.
        Same thing for WAN IP 190.89.21.1b - local server 192.168.1.3.

        The ports may be the same, but source and destination IP's are different, so two NAT rules will work.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User
          last edited by

          Hi @Gertjan thanks for you response but i have a one interface WAN with serveral ip alias on this, also the second interface is for the LAN; how can make this NAT on this scenario

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by Gertjan

            Ah ...

            From what I make of it, NAT rules are Interface based.

            I guess you have to change one 'outside' port number, like :
            Remotely connect to 190.89.21.1a on port 23, you wind up connecting to local server 192.168.1.2 - port 22.2

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • RicoR
              Rico LAYER 8 Rebel Alliance
              last edited by Rico

              Just pick your IP Alias (Virtual IP) in the NAT Rule.

              -Rico

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User @A Former User
                last edited by A Former User

                @klausneil said in CREATE NAT TO SAME PORT ON DIFFERENT SERVERS:

                Hi, i need help in a configuration i dont know how make this but the problem is this i have a antispam server (192.168.1.2) your ip public is 190.89.21.11 and have ssh port (22/tcp); also i have a mail server (192.168.1.3) your ip public is 190.89.21.12 and have the same ssh port (22/tcp), what is the rule that can allow conect two different server with the same port or only can change the port of one they

                Yes i already did that 👆

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