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

Question about SNAT/DNAT ... I am probably ...

I recently setup an Astaro box at a client of mine. The box has three nics in. One on a 192.168.200.XXX network, one on a 172.19.XXX.XXX network and the other on a small subnet from their ISP (forget the range) refered to as the 'external' network.

Anyway ... Currently the Exchange server sits on the external network as well as the 172.19.XXX.XXX network. For various reasons dns resolves the ip of their exchange server to the external IP address. We will move the exchange server behind the firewall at some point ... but not yet.

I am currently playing DNS proxy games to get the internal (172.19.2.5) ip address of the exchange server back to the clients of the 172.19.XX.XX network, instead of the external ip.

But ... I figured I could do the same thing by doing a DNAT/SNAT. So that any connection from the 172.19.XXX.XXX (source) to the external ip of the exchange server would have the destination address mapped to the internal ip address of the exchange server (172.19.2.5). But this doesn't seem to work.

Any reason(s) why it wouldn't? I'll be happy to provide more information as I'd like to understand this better. 

Also we plan to move the exchange server behind the firewall (disconnecting the external interface) and I want to make sure I can use DNAT/SNAT to map the old external IP address of the exchange server to the internal address. So help on how to do that effectively would be great as well.  


This thread was automatically locked due to age.
Parents
  • This is kinda hard not knowing what other servers you have internally (DNS, DHCP, WINS).  There are a couple of ways I would set it up, however I wouldn't use DNAT/SNAT to solve your Exchange problem as you described.

    option 1.  If you have an internal DNS, make a A host record for your Exchange servers internal NIC.  Have all your clients point to your internal DNS for name resolution, and set your internal DNS server to forward to your ISP's DNS, or your ASL box if using DNS Proxy.

    option 2.  If you do not have an internal DNS server, depending on the number of clients you have you can use a host file on each client (this is a crappy option for anyone who has used host files).

    option 3.  Leave everything alone until you move the Exchange server behind the firewall (recommend you to do this as soon as possible), then use DNAT/SNAT.  You can find instructions in the manual on how to set this up.

    I am sure there are many other options, and I am sure you will get a few more post.  This board is really good at helping out.  Good Luck.   
  • bit late... anyway...

    just in case your dnat/snat rule does not work properly, maybe the following will help:

    when natting the external interface ip (destination) to the internal server ip the request from your client (source) will arrive at the server as a packet sent from your client (source) to the server (destination / internal). Thus the answer will be sent to the client with internal server ip to internal client ip directly, but your client waits for packets from the firewalls external IP. In this case you should change the source address in your nat rule as well. Change source to ASLs IP on the internal interface to make sure the packet returns to the firewall and gets rewritten correctly by the connection tracking....

    hth
    /marcel
Reply
  • bit late... anyway...

    just in case your dnat/snat rule does not work properly, maybe the following will help:

    when natting the external interface ip (destination) to the internal server ip the request from your client (source) will arrive at the server as a packet sent from your client (source) to the server (destination / internal). Thus the answer will be sent to the client with internal server ip to internal client ip directly, but your client waits for packets from the firewalls external IP. In this case you should change the source address in your nat rule as well. Change source to ASLs IP on the internal interface to make sure the packet returns to the firewall and gets rewritten correctly by the connection tracking....

    hth
    /marcel
Children
No Data