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 from DMZ to DMZ?

We have:

          EXT
           |
      ASL 2.000
     /         \
    DMZ        INT NET
(1 computer)

dmz is 192.168.0.0 but just has 1 server in it.

INT is 10.1.1.0
I have DNAT rule for HTTP so that WWW.mydomain.com  goes to DMZ, and Packet RULE  :
ANY HTTP DMZ ALLOW
This works fine from EXT and INT.

DMZ server is running apache and BIND (authoritative NS)... this all is fine.

However, DMZ server is also running SQUID, and SQUID thinks www.mydomain.com  is EXT IP, and DNAT isn't sending DMZ - EXT HTTP back to DMZ.
HOSTNAME on DMZ is correct (www....) but DNS points to EXT IP (needed).

So, how do I:

Get DNAT working for DMZ - DMZ?
or
Get SQUID to be smarter about it's own hostname?

Thanks,
Barry


This thread was automatically locked due to age.
Parents
  • i have the same problem. extern an ip-alias with dnat (http) to the internal DMZ-server. from extern to dmz-intern it works fine.   [:)] 

    when connecting from dmz-intern to the aliased extern-ip, the dmz-internal couldn't
    find himself   [:S] 

    when everyone has an answer - there are two

    thanx
Reply
  • i have the same problem. extern an ip-alias with dnat (http) to the internal DMZ-server. from extern to dmz-intern it works fine.   [:)] 

    when connecting from dmz-intern to the aliased extern-ip, the dmz-internal couldn't
    find himself   [:S] 

    when everyone has an answer - there are two

    thanx
Children
  • hello all,

    this is not an error, this is by network-design.

    if you want to connect from internal-net to your webserver in the DMZ using your www.mydomain.com  name, you must have an internal DNS-Server, that point your www.mydomain.com  webserver to your internal IP-Adress.

    greetings
    eldorado
  • Eldorado, I don't fully agree with you.

    The INTERNAL network CAN talk to the DMZ with the EXTERNAL IP just fine (Thanks to DNAT).

    However the DMZ cannot talk to itself via the EXT IP. (DNAT not working?) Maybe THIS is by design, DNAT is designed to solve these kind of problems.

    Everything works fine except for Squid on the DMZ server cannot load pages from the DMZ server.

    Barry
  • OK, NAT is a mess. I hate it more than stale coffee.

    All those DNAT problems have one thing in common: A server process get an answer from an IP address which he did not ask in the first place ..

    In your case, Squid asks www.mydomain.com  (1.2.3.4 maybe) but gets the answer from 192.168.0.x (basically his own host). Of course, he hates this.

    Solution: Assign the external IP (1.2.3.4) to the DMZ server as a secondary virtual interface with netmask 255.255.255.255. You may have to tweak the apache (?) config if you use virtual HTTP hosts.

    Now Squid can query www.mydomain.com  without leaving the DMZ.

    /tom
  • The Solution for all is: Masquerading DMZ --> DMZ  [:)]

    This working fine in our Firewall.  [;)]