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

DNAT a webServer

Hi,

I'm very new to this forum and to the Astaro products and hence need some help.

I've been trying to setup a Webserver which is a part of my internal network on my Astaro firewall using the DNAT with no success. I'll explain what I've done.

I have a box with 2 LAN interfaces (internal / external). the External is already configured with a Public IP and have added another Public IP as an additional Interface.

Now, on the internal network, I have a webserver which needs to be accessed from Internet. I have created a DNAT rule to forward any traffic on the additional interface to the webserver (a host definition is also created). Ive also created a Packet filter rull and added it to the top of the group to route all traffic on the additional interface to this host.

The firewall is visible from the Internet and hence expect the additional interface too be available when accessed through HTTP.

When internally I ping the Public IP I can see it replying from the local host (webserver).

I'm sure I've done real stupid mistake but cant figure it out.

Can someone help.

Kumaran [:S]


This thread was automatically locked due to age.
Parents
  • Does the web server have a default gateway configured, so that its outgoing traffic is sent to the Internal interfase of the ASL box?

    Since you configured a secondary address on your External interface, and you are using that secondary IP address as the source for the traffic that you SNAT in to the web server, is the outbound traffic from the web server going back out the same way, via the secondary IP address?
    Keep in mind that regular outbound traffic will be sent via the primary external IP address. You will need to make a separate outbound routing rule to force the outbound web server traffic to be issued from the secondary IP address.

    I suspect your setup would be easier to get working if you did not have a secondary IP address on the external interface.
Reply
  • Does the web server have a default gateway configured, so that its outgoing traffic is sent to the Internal interfase of the ASL box?

    Since you configured a secondary address on your External interface, and you are using that secondary IP address as the source for the traffic that you SNAT in to the web server, is the outbound traffic from the web server going back out the same way, via the secondary IP address?
    Keep in mind that regular outbound traffic will be sent via the primary external IP address. You will need to make a separate outbound routing rule to force the outbound web server traffic to be issued from the secondary IP address.

    I suspect your setup would be easier to get working if you did not have a secondary IP address on the external interface.
Children
  • Thanks for that. I've configured the webserver default gateway to be the internal interfaceof the Firewall. I'm not sure if the traffice from my webserver is going through the secondary interface on the external interface.

    Should I create a DNAT/SNAT rule for this. Please explain for me, I look like getting lost here.

    Regards,
    kumaran 
  • [ QUOTE ]
    Should I create a DNAT/SNAT rule for this. Please explain for me, I look like getting lost here.

    [/ QUOTE ]You probably have to. Keep in mind that the other end of the connection, the browsers that talk to the web server, may themselves be behind routers that do statefull inspection of the traffic. They will naturally expect the replies from the web server to come from the same IP address that their browser clients sent their requests to.

    Your simplest solution, is to get rid of the second IP address on the WAN interface, and just use a single IP address for the outside world. Alternately, you'll need an additional SNAT rule sending all traffic from the web server on the Internal network out through the secondary IP address on the WAN side.
  • Hi,

    I managed to get the Secondary interface (public) to NAT to my local server and is working fine.

    Now, I have a problem wherein a few users are having problems in accessing the server. Investigating on it I found that this happens even on 1 of the Internet connection that I have. I basically have 3 gateways(3 internet connections) lets say G!,G2&G3. The server is connected thro' G1 and is accessible from G3 and not from G2. Interestingly, from G1 and G3 which are from the same IP, when I try to access the website on the server it fails. while G2 can see the server.

    Any Ideas?? I now think about the outside firewall looking for a reply from the same ip to which it sent its request.

    Can you throw some light on this please?

    Kumaran
  • With your multiple subnets, as you have described, do you have a  masquerading rule in place for each one of them, to NAT (Network Address Translate) it behind the WAN interface?

    On my network, I have three general masquerading rules in place.

    I NAT the Iinternal network behind the WAN interface.
    I NAT the DMZ network behind the WAN interface.
    I NAT the PPTP-Pool network behind the WAN interface.

    That way, my machines can see out to the Internet from wherever they are.