This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can't get Nat Working for webserver

Hi All,
I just did a fresh install of ASG 7.504 and I can't get nat to work for my web server.  I read as manny of the other posts that I can find and none of them have given me the answer.  Here is the setup

I auto setup my web server in the DNS database, to build the definition.

dnat looks like 

Trafic Source > Internet
Trafic service > HTTP (ie. port 80)
Trafic Dest    > WAN address (my public ip)

NAT mode > DNAT

Destination > Webserver ( the ip of my internal web server)
Destination service > left blank

Log initial packet > checked
Automatic filter > checked 

Here is the live log:

18:19:57 Connection using NAT TCP 68.XX.XX.XX:51844→76.122.XX.XX:80 [SYN] len=60 ttl=51 tos=0x00 srcmac=00:01:5c:24:62:c2 dstmac=00:0a:5e:05:68:ca
18:19:58 Connection using NAT TCP 68.XX.XX.XX:59229→76.122.XX.XX:80 [SYN] len=60 ttl=51 tos=0x00 srcmac=00:01:5c:24:62:c2 dstmac=00:0a:5e:05:68:ca
18:19:58 Connection using NAT TCP 68.XX.XX.XX:55583→76.122.XX.XX:80 [SYN] len=60 ttl=51 tos=0x00 srcmac=00:01:5c:24:62:c2 dstmac=00:0a:5e:05:68:ca
18:19:58 Connection using NAT TCP 68.XX.XX.XX:56267→76.122.XX.XX:80 [SYN] len=60 ttl=51 tos=0x00 srcmac=00:01:5c:24:62:c2 dstmac=00:0a:5e:05:68:ca

I aslo get HTTP error 504: Gateway Timeout


This thread was automatically locked due to age.
  • Hello,

    is the Webserver able to reach the Internet? Your DNAT rule looks (almost) correct, packets should arrive at the Webserver. Perhaps the problem is that it is unable to answer to the requests? Also I wrote 'almost', because you told us your SRC is 'Internet'. Did you use the 'Internet'-Network-Definition for this? If that' s the case then this may wrong - please use 'Any' instead. Otherwise you may not be able to connect from inside.
  • Well I did use the Internet Definition that is auto created when 7.504 installed.

    I thought that i read that you should not use the any in the newer version as it works differently than in past os's.  Any way i could not get it to work with the any def and that is why I used the Internet def.

    I can get out from the web server if i use a web browser like elinks.
  • Do you have a packet filter rule to allow incoming HTTP traffic?
     
    Also, is there a firewall installed on the web server itself and if so, have you created a rule to allow the incoming traffic (with windows server 2008 and 2008 R2, the firewall is enabled by default and will block traffic unless a rule is put in place to allow it)?
  • Scott I think I have set the correct incoming rule, i checked the box for automatic filter rule when setting up the Dnat rule.

    As for the web server it's self it is set correctly.  I know this for 2 reasons I can get it to work with an other router and I also had it working with an older install of ASG.
  • Felix, please show a picture of your DNAT and one of the Host definition of the webserver that's the internal target of the DNAT.

    Cheers - Bob
  • That looks perfect - just as you described it.  My guess would be that the webserver doesn't have the Astaro as its default gateway.

    Cheers - Bob
  • here is what comes up for the default gateway on the server,


    [user@server ~]$ sudo netstat -nr 
    [sudo] password for user: 
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
    0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
    [user@server ~]$
  • Does the DNAT work if your Client comes from the Outside?
  • That is the problem I can't get it from the outside.

    I did the reinstall to just make it easy to clean up the last install.  If I go back to an old back up and reinstall avery thing will work,  so there has to be something in the new install that i blocking it.