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

difference between dmz vs. dnat

hoi,

i need to setup two server for full internal and some external use. i always did this with dnat before. no i got an additional nic and i am wondering what are the pros/cons of this two solutions.

thanks!
  


This thread was automatically locked due to age.
Parents
  • to keep it short, i need help... just looked up some docs but the won't help me.


    i got the following on my box:
    192.168.3.1   eth0, internal
    212.xxx.xxx.106 external ip astoro, eth1, masq-device for internal client
    212.xxx.xxx.200-202 free adresses.

    i want a server (212.xxx.xxx.202) to be accesible with all services from internal clients and only via port 80 from outside.

    how do i have to setup the system? e.g. which gateway do i have to set up on my dmz-interface eth2? thanks for help!

     
  • [ QUOTE ]
    to keep it short, i need help... just looked up some docs but the won't help me.


    i got the following on my box:
    192.168.3.1   eth0, internal
    212.xxx.xxx.106 external ip astoro, eth1, masq-device for internal client
    212.xxx.xxx.200-202 free adresses.

    i want a server (212.xxx.xxx.202) to be accesible with all services from internal clients and only via port 80 from outside.

    how do i have to setup the system? e.g. which gateway do i have to set up on my dmz-interface eth2? thanks for help!

      

    [/ QUOTE ]

    I'll try to be as short as possible on this one but first, I would suggest you to subnet your external IP range, leaving on one side only the router (you didn't mention it's IP) or whatever device you use for your connection and the external ASL NIC, and on the other side the DMZ range.

    The following setup should work for you (based on my setup which is similar and working:

    1. Set eth1 gateway to the IP of your router and enable the ARP function on it.

    2. eth0 (internal) leave with 'none' as gateway

    3. assign to eth2 a free IP and leave with 'none' as gateway

    4. Create a network definition for your server 212.xxx.xxx.202/255.255.255.255

    5. Create a rule allowing the internal network to access any on any

    6. Create a rule allowing any to access the server defined in step 4 to HTTP

    7. You should also Masquerade your internal network onto the external IP of the firewall.

    This is a basic quick explanation. I hope it helps.
    Maurice  
  • hoi maurice,

    thanks for your help. it doesn't work out, so here a plan of our network:


    eth0, internal interface, 192.168.3.0, netmask 255.255.255.0, no gateway

    eth1, external interface, 212.xxx.xxx.146, netmask 255.255.255.240, gateway 212.xxx.xxx.145, arp enabled

    eth2, should be dmz, 212.xxx.xxx.149, netmask 255.255.255.240, no gateway (ip address not in use by a server)

    eth2.0 should be 1st computer on the dmz, 212.xxx.xxx.150, netmask 255.255.255.240, no gateway

    masq 192.168.3.0 to eth1


    created a network group {dmz} with 212.xxx.xxx.149 and 212.xxx.xxx.150 in it
    allowed all traffic from eth0 to dmz
    allowed only port 80 from eth1 to dmz


    any idea? thanks a lot for your assistance.

    seb






      
Reply
  • hoi maurice,

    thanks for your help. it doesn't work out, so here a plan of our network:


    eth0, internal interface, 192.168.3.0, netmask 255.255.255.0, no gateway

    eth1, external interface, 212.xxx.xxx.146, netmask 255.255.255.240, gateway 212.xxx.xxx.145, arp enabled

    eth2, should be dmz, 212.xxx.xxx.149, netmask 255.255.255.240, no gateway (ip address not in use by a server)

    eth2.0 should be 1st computer on the dmz, 212.xxx.xxx.150, netmask 255.255.255.240, no gateway

    masq 192.168.3.0 to eth1


    created a network group {dmz} with 212.xxx.xxx.149 and 212.xxx.xxx.150 in it
    allowed all traffic from eth0 to dmz
    allowed only port 80 from eth1 to dmz


    any idea? thanks a lot for your assistance.

    seb






      
Children
  • Hi seb,

    did you read carefully the Guidebook from Astaro ??
    --> http://docs.astaro.org/guidebooks/Guidebook-US-ASL-V4_dnat_web-server.pdf

    I would recommend you something like that:

    * your config*
    eth0, internal interface, 192.168.3.0, netmask 255.255.255.0, no gateway

    * your config*
    eth1, external interface, 212.xxx.xxx.146, netmask 255.255.255.240, gateway 212.xxx.xxx.145, arp enabled

    * recommended*
    eth2, should be dmz, 192.168.4.0, netmask 255.255.255.0, no gateway

    * your config*
    masq 192.168.3.0 to eth1

    1.) Give the ASL on the DMZ side 192.168.4.1
    2.) Give your first webserver 192.168.4.2
    3.) Add the webserver to your networks (2 definitions)
    /WEBSERVER_INT /192.168.4.2 /255.255.255.255
    /WEBSERVER_EXT /212.x.x.149 /255.255.255.255
    4.) Enter a DNAT rule like this
    All -> WEBSERVER_EXT /HTTP (no SRC translation) WEBSERVER_INT 
    -> That means, all traffic asking for the official adress (HTTP only) will be redirected to your internal adress
    -> If you need more ports, like HTTPS, create DNAT rules for each service
    5.)  Create rules like
    /Any /HTTP /WEBSERVER_INT /Allow
    /Intranet /Any /WEBSERVER_INT /Allow
    -> First rule lets anybody access server via HTTP
    -> Second rule lets anybody from Intranet access server on any ports
    -> If the server needs access to your intranet (only if HE is initiating the connection), be restrictive ! If somebody *_would_* hack your server he could get access to your intranet, otherwise.
    6.) Remarks:
    -> Servers default gateway is DMZ-interface of firewall
    -> You should exclude the Webservers IP from Internet Explorers proxy options ('Do not use proxy server for the following adresses' or so)

    Good luck and tell us your results !!

    Regards,
    Karsten
       
  • hoi karsten,

    thanks for your reply. of course i read all docs ;-)

    i was wondering which config should be better: using "real" ip adresses or doing snat/dnat. dnat/snat is no problem, running some server this way before...

    thanks,

    seb
     
  • Hi seb,

    if i was counting right ;-) you have 14 official IPs...
    ... most of us have onyl the 'Standard-Packet' which gives you 6 IPs (already excluded Netork and Broadcast adresse).

    Therefore for me it would be 'wasting' for me to give my DMZ official IPs, loosing some for Gateway stuff and others.

    Karsten

    P.S.: Does that mean, you are up und running ?? *gngngng* (censored)
    Hopefully somebody else can use my posting, so it was not worthless
        
  • thanks thanks,

    we have some more IPs to use ;-) so i am still looking to easy implement official ips to a DMZ. mmh. 

    but hey, thanks anyway.

    seb  
  • so i did the following:

    set eth2 (dmz) to free ip 192.168.4.1 with subnet 255.255.255.255

    set the webserver to 192.168.4.2 with subnet 255.255.255.255
    as default gateway on this w2k machine i set 192.168.4.1

    set an additional ip 192.168.4.2 on eth2

    set the external ip as additional ip to the wan interface

    did a rule

    lan-->dmz all allow
    wan -->to this webserver port 80 allow


    and finally: i can ping this webserver, i can even portscan, port 80 shows as open, but i cannot connect to this port - timeout.

    other services like timbuktu (installed for testing ports) won't connect cause of timeout.

    any hints on this one?

    thanks!