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

    [SOLVED]NAT HTTP port Forward doesn't work for a webserver and work for an other

    Scheduled Pinned Locked Moved NAT
    5 Posts 3 Posters 1.4k 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
      aityahiaidir
      last edited by

      Hello

      In my LAN i have two webserver for example

      (1) - 192.168.1.1:80
      (2) - 192.168.1.2:80

      I would like to redirect WAN incoming HTTP requests to webserver (2),for this  i have created a NAT rule, but it wont work, the port 80 still closed from outside (checked with ping.eu).

      when I change my NAT rule to redirect to webserver (1) , a redirection work and my web server is accessible from outside

      locally both servers works, port 80 is open.

      what is the possible cause for such behavior

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        Not having a firewall rule that allows the traffic to webserver2?  Creating the NAT is only half the job.

        1 Reply Last reply Reply Quote 0
        • M
          muswellhillbilly
          last edited by

          Sounds like it might be a routing issue. Webserver 1 might have the default gateway set to use the pfSense firewall, so when you NAT to port 80 on server 1 the replies know where to go. If webserver 2 doesn't have it's default gateway set to the same IP as 1, then this would mean web traffic would hit the server and the replies wouldn't get out via the correct route. The other thing to check is whether server 2 has a local firewall operating which might be blocking port 80 inbound.

          1 Reply Last reply Reply Quote 0
          • A
            aityahiaidir
            last edited by

            Thanks for reply and sorry for delay

            @KOM:

            Not having a firewall rule that allows the traffic to webserver2?  Creating the NAT is only half the job.

            i have not another Firewall,this is probably the cause notified by muswellhillbilly

            @muswellhillbilly:

            Sounds like it might be a routing issue. Webserver 1 might have the default gateway set to use the pfSense firewall, so when you NAT to port 80 on server 1 the replies know where to go. If webserver 2 doesn't have it's default gateway set to the same IP as 1, then this would mean web traffic would hit the server and the replies wouldn't get out via the correct route. The other thing to check is whether server 2 has a local firewall operating which might be blocking port 80 inbound.

            it is highly probable that  is the cause of problem, I will check this settings and I will keep you informed

            1 Reply Last reply Reply Quote 0
            • A
              aityahiaidir
              last edited by

              :D

              Problem solved problem solved, it was actually the default gateway, I pointed to my server 2 pfSense router and everything works

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