Guest User!

You are not Sophos Staff.

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 doesn't work for HTTP

I setup DNAT to forward HTTP requests to an internal webserver using 1.811.  It worked fine.  I imported my backup into a newly installed 2.0 beta 4 and DNAT works for everything except the webserver.  I even reinstalled and set it up from scratch.  Still doesn't work.  Help!


This thread was automatically locked due to age.
  • Would someone please help me on this one?
  • I'm routing to a webserver using 1.940. I have set up an IP alias to listen for on eth1 (besides the regular one) which was the one used on the internet by the webserver BEFORE I had put it behind the firewall. then added a DNAT to it and a filter rule to allow traffic. try this way if you can.

    good luck
  • Have you configured the rules to allow traffic to port 80 in that server into your DMZ?

    You should add it in Packet Filter having configured two networks

    DNAT Rule
    ext-ip --- http --- int-server --- http
    network     service    network      service

    Packet Filter Rule
    Source-lan        Dest-lan   port allow/deny
    any  ---------   int-server --http -- allow

    Good Luck  [;)]
  • I'm having a similar problem in 1.811. I'm using DNAT to allow access to my mail- and web-servers (both on the same internal server). SMTP works fine, but HTTP doesn't. I set up both the DNAT and filter rules identically (except for the service names, ofcourse).  [:S] 

    Can anyone explain why SMTP would work, but HTTP not? Or better yet, can anyone tell me how to get the HTTP to work?

    Thanks.
  • I only have one IP address, so I can't alias another.  Someone please help.
  • Hi DFR,

    Thanks for your response. I have done exactly as you've described for both SMTP and HTTP. The SMTP works fine, but the HTTP does not. Internally, the HTTP works, and the Web server is configred to allow connections from anyone.

    Any other ideas? Anyone?

    /mitsa
  • I have already set up the rules.  I have tried 1.811, 2.0 beta 1 through 4.  Nothing works.  Help!!!!!
  • Hello folks,
    Here is how I solved the DNAT problem for HTTP:
    I set up a local DNS server on the internal LAN which would resolve the name of my internal web server. Since the proxy on the firewall relies on an external DNS, my internal web server name could not be resolved as itself and would always point to the firewall name ( the only guy with a public IP address)
    After that I gave the firewall 2 external DNS entries. The first is the public one and the second my newly setup one on the internal LAN. This way, when the external DNS fails to resolve, the firewall asks the local one and he gets the answer.
    Only thing is you have to make the firewall listen on both interfaces (internal lan + public) in the DNS proxy.
    Thats it.
    Hope that helps someone.
    Anthony
  • Doesn't allowing external requests to DNS open a number of security issues ?

    Just a question....