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

Very simple DNAT rule won't work

My configuration is very simple, an Astaro SW 6.202, two NICS, eth0 is Internal, eht1 is external (DHCP).

Everything has been working fine since installation, no problems at all.

I have a web server in my internal network (192.168.0.100/24), the server is listening on a non-standard TCP port (4000), because my ISP will block TCP packets directed to port TCP 80.

So, I want to publish my web server to the internet.

This is what I do:

I create a Network definition: web server (host) 192.168.0.100
I create a service definition: HTTP non standard: TCP 4000
I create a DNAT rule: from ANY to Internet (adress) Service: HTTP non standard ------> change destination to web server.

BEFORE i create the necesary packet filter rule, I open the packet filter live log and ask a friend on the internet to browse the ip and port like this 
http://MY_EXTERNAL_IP:4000

According to what I understand, DNAT rules are applied BEFORE packet filter, so in the packet filter live log I should see something like this:

EXTERNAL_IP_ADRESS_OF_FRIEND  PORT XXXX -> 192.168.0.100 (my internal web server, since the DNAT rule should be applied by now) PORT 4000.

Instead I see the same thing but i see my external IP adress instead of 192.168.0.100, so I presume DNAT rule is NOT working.

I've tried changing the DNAT rule, I've changed ANY (in source) to NO MATCH, with the same results... [:(]

I have IPS on, and in the Advanced IPS definitions I have my internal webserver listed in the webservers selection box, and HTTP non standard as the HTTP service.

Did I do something wrong?

Thanks in advance.

ps: I had ISA Server before ASG and I was able to publish my internal web server with no problems at all.


This thread was automatically locked due to age.
Parents
  • I create a Network definition: web server (host) 192.168.0.100
    Is this the actual IP address of your web server on your Internal network? I ask, since 192.168.0.100 also happens to be the default address suggested during the install for the Internal interface on an Astaro box. For your setup, you need a DNAT rule from TCP port 4000 on the WAN interface to TCP port 80 on your web server. Personally, I use TCP ports 83 and 88 on the WAN side to get around the ISP port 80 block.

    By the way, going with the Astaro suggested 192.168.0.xx net during installation is not such a good idea. It is better to use a private net number that does not have  zero as the third octet. Also, the Internal interface on the Astaro box, being the default router for the Internal network, ought to have device address 1 on that subnet. Next time you install Astaro, I would suggest using an IP address such as 192.168.123.1 for your Internal interface instead of using the 192.168.0.100 default. To ensure a relatively unique private LAN number for VPN routing purposes, pick a random number in the range of 101 to 255 for the third octet, instead of the 123 used in my example.
  • As long as his private network is in one of the following ranges:

    10.0.0.0 – 10.255.255.255
    172.16.0.0 – 172.31.255.255
    192.168.0.0 – 192.168.255.255

    I don't see any problems, though picking a random /24 will help prevent any future VPN issues as that will reduce the possibility of routing conflicts.

    Back to the ffoschiatti's issue, it sounds like he has everything configured correctly. Have you tried a different port besides 4000?
  • Velvet: yes, 192.168.0.100 is the actual ip of my web server. The setup you suggest won't work since my web server is ALSO listening on port TCP 4000 (i could change this to 80 and use Port translation in the DNAT rule, but I don't know if this will bring aditional problems).

    Why do you advice not to use zero as the third octet? is there any reason in particular?

    My ASG DOES have the 192.168.0.1 IP adress on the internal interface (eth0)

    Dress: YES; I tried MANY other TCP ports besides 4000.

    Any other ideas?

    Thanks!!!
  • I had similar issues and did not manage to resolve so would be interested in any help!
     
    Also how do host headers hget treated?  In IIS I have different sites offered up on the same IP address based on the host header i.e. www.site1.com goes to the main site, www.site2.com resolves to the same IP but with the different header.  As my server is dual homed right now I have split IP.  Should I drop all of that and should the headers refer to the INTERNAL IP address of the server with host header OR should it remain the PUBLIC IP address and host header?
     
    Thanks for any help on this!
     
    Regards
     
    Chris
  • Astaro doesn't know anything about the HTTP Host headers, it is only routing packets. The web server determines what site the user wants by examining the Host header and responding appropriately.

    ffoschiatti, would it be possible for you to post a screenshot of your NAT screen?
Reply
  • Astaro doesn't know anything about the HTTP Host headers, it is only routing packets. The web server determines what site the user wants by examining the Host header and responding appropriately.

    ffoschiatti, would it be possible for you to post a screenshot of your NAT screen?
Children