[SOLVED]NAT HTTP port Forward doesn't work for a webserver and work for an other
-
Hello
In my LAN i have two webserver for example
(1) - 192.168.1.1:80
(2) - 192.168.1.2:80I 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
-
Not having a firewall rule that allows the traffic to webserver2? Creating the NAT is only half the job.
-
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.
-
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
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
-
:D
Problem solved problem solved, it was actually the default gateway, I pointed to my server 2 pfSense router and everything works