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/SNAT confusion

i am new to astaro and am finding dnat/snat difficult to understand.  i am running version 3.2

i have a basic set-up.  3 nic's. (external, dmz, internal).  i am running a web server but cannot figure out how to set up the dnat/snat settings to allow traffic to get to my server.  i am currently allowing ALL traffic from any to any under my packet filter rules.  i have the masquerading set up properly.  i can access the internet from all connections but i cannot access the web server.  when i try to set up dnat/snat i actually lose access to the internet.  i've tried from any to any using http and dns and all other kinds of scenario's but it doesn't seem to work.

any ideas?

thanks in advance.


This thread was automatically locked due to age.
Parents
  • Originally posted by omni:
    i am new to astaro and am finding dnat/snat difficult to understand.  i am running version 3.2

    i have a basic set-up.  3 nic's. (external, dmz, internal).  i am running a web server but cannot figure out how to set up the dnat/snat settings to allow traffic to get to my server.  i am currently allowing ALL traffic from any to any under my packet filter rules.  i have the masquerading set up properly.  i can access the internet from all connections but i cannot access the web server.  when i try to set up dnat/snat i actually lose access to the internet.  i've tried from any to any using http and dns and all other kinds of scenario's but it doesn't seem to work.

    any ideas?

    thanks in advance.
    First you have to create a Definition for your web server under Definitions>Network..

    Webserver1 = 192.168.1.x/255.255.255.255

    If you web server is the only web server or you only have one External IP (that is being used by your firewall)

    SNAT/DNAT

    Packets to match(this is where you flag the incoming packets that you want to be forwarded.

    Source ::NO MATCH::  
    Destination (External Interface) 
    Service HTTP(or desired service)
    ----------------------------------------
    (Below the linebreak is the section where you decide where the flagged packets go)

    Change Source to ::NO CHANGE::
    Change Dest to: Webserver1
    Service Dest ::NO CHANGE::

    set up your Packet Filter rules from any HTTP service to Webserver1 Allow

    and you should be good to go..
    ------------------------------------------------

    if you are going to run Multiple web servers behind your firewall you must have additional External IP's avaliable, and create Virtual IP's on the External Interface...

    Create a Definition for each Virtual Ext IP..

    WebServ1_Ext x.x.x.50/255.255.255.255 
    Webserv2_Ext x.x.x.51/255.255.255.255

    Create a Definition for each Internal Web server

    Webserv1_INT 192.168.1.50
    Webserv2_INT 192.168.1.51

    SNAT/DNAT

    Packets to match
    Source ::NO MATCH::  
    Destination (Webserv1) 
    Service HTTP(Any)
    ----------------------------------------

    Change Source to ::NO CHANGE::
    Change Dest to: Webserver1
    Service Dest: ::NO CHANGE::

    do that for all web servers...

    now set up your Packet Filter to only allow the ports that you want open...

    this is how I did it... anyone out there who finds a mistake please post it.
  • knight,

    it worked PERFECTLY!!!

    thanks again for your help!  
Reply Children
  • hi all,

    I got the same problem and I try to connect to the internal server, I got the following message:

    10.126.0.x: inverse host lookup failed: Host name lookup failure : Connection timed out
    (UNKNOWN) [10.126.0.50] 80 (http) : Connection timed out
     sent 0, rcvd 0
      
    Do I need to add the hosts to the hosts on the ASL?...or when I define the Networks, I need to put the real server name?

    please help!! thank you

    Gary
  • I am having trouble too. I have the basic firewall with:

    internal/eth0/192.168.3.1-24
    external/eth1/216.63.37.117-39
    dmz/eth2/10.20.10.1-24
    Virt/eth1:1/216.63.37.113-32

    Host defined:

    AKserv_Int/10.20.10.2-24
    AKserv_Ext/216.63.37.113-32

    Packet Rules:

    eth0_network -> any server -> any dest -> allow
    Any -> dns -> AKserv_Int -> allow

    DNAT/SNAT:
                     
    Match-
    Source:  ::No match::
    Dest:  AKserv_Ext
    Service: DNS

    Change-
    Source: ::No Change::
    Dest: AKserv_Int
    Service: ::No Change::

                        And------------

    MASQ Rule:

    Eth0_Network -> eth1

    And I cannot get the internal network to see the DMZ or get the External network to forward traffic to AKserv for DNS. Later I will need to forward HTTP and SMTP to that server also.

    What am I doing wrong?
     
     [size="1"][ 21 July 2002, 20:24: Message edited by: PreyTell ][/size]