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

What kind of Nat required.

Hello,

New to the forum and to firewalls in general..
We are currently in the testing phase of an astaro 220 security gateway v7 to use as a firewall/smtp server.
I'm having a few issues at the present moment with the firewall side of things, i'd appreciate some help..

Setup... 

We have approx 20 public IPs assigned to various internal servers (1 NIC with public IP, the other NIC with private).. 
The WAN router is directly connected to the internal network. 
Im looking to place the firewall in between and packet filter these public IPs.
So far i've configured 2 interfaces on the astaro, one external, the other internal. I've then assigned the external interface with the additional public IPs. 
I have created host definitions, one for each public facing server and configured DNAT to send the traffic from the additional Public IP to the corresponding server.
Packet filtering has also been setup, with the allow all rule for testing purposes. 
I've tried pinging the additional external IPs without any joy, i can only get a reply from the one external IP assigned to the astaro. 

Do i need to configure the SNAT aswell, or will it automatically route out, as the same IP is defined on the external interface.
Also do i add these additional addresses with subnet mask of 255.255.255.255 ?
 
Any help would be greatly appreciated.

Thanks
Atrixo


This thread was automatically locked due to age.
  • I believe you should be using SNAT plus DNAT.
    Also, you need to use "private addresses" on the DMZ (Proxy ARP changes this?), and then SNAT those to the external addresses.

    You may also want to enable the ICMP rules for ping and traceroute, btw.


    Other options would be:

    a. bridged mode (bridging EXT and the DMZ interfaces)

    b. a small "transfer network" where you subnet your public IPs into 2 subnets, 1 external, and 1 for the DMZ. I'd recommend this, but if you only have 31 IPs total, you wouldn't be able to create a subnet of that with 20 IPs.

    Barry
  • I believe you should be using SNAT _instead of_ DNAT.
    Also, you need to use "private addresses" on the DMZ (Proxy ARP changes this?), and then SNAT those to the external addresses.

    You may also want to enable the ICMP rules for ping and traceroute, btw.


    Other options would be:

    a. bridged mode (bridging EXT and the DMZ interfaces)

    b. a small "transfer network" where you subnet your public IPs into 2 subnets, 1 external, and 1 for the DMZ. I'd recommend this, but if you only have 31 IPs total, you wouldn't be able to create a subnet of that with 20 IPs.

    Barry


    Thankyou for the reply.

    Im i wrong in assuming that DNAT is used for incoming (destination) and  SNAT for outgoing? 
    If SNAT is the way to go, is the following example correct..

    Webserver. IP 1.1.1.1. Host defined as webserver.
    Also assigned to external interface on astaro as Ext_web with IP 1.1.1.1

    1) Create a SNAT rule
    Goto Network Security>>NAT
    Select DNAT/SNAT tab
    New NAT rule
    Name: Webserver access
    Group: No group
    Position: Bottom
    Traffic Source: Ext-web
    Traffic Service: HTTP
    Traffic Destination:  webserver
    NAT Mode: SNAT (source)
    Source: ??? - not sure what to specify here.
    Source Service: HTTP (or left blank)



    I'm looking to have the firewall setup without making too many changes to the internal network (want to keep the public IP on the servers for the moment) as we are currently only testing the astaro and may not end up purchasing it.
    I've looked at the Astaro knowledgebase. Article 239708 talks about using DNAT to have internet connections accessible behind the ASG.
    I'm a newbie when it comes to firewalls so pardon my stupidity. [:)]
  • I haven't done SNAT, but from the docs, it looks like you have to use different IPs on the internal machines.
    Proxy Arp _may_ be a way around that.

    Also, I believe the SNAT rule should be 
    Source: Webserver
    Change Source address to: EXT IP

    Barry
  • Do i need to configure the SNAT aswell, or will it automatically route out, as the same IP is defined on the external interface.
    Also do i add these additional addresses with subnet mask of 255.255.255.255 ?


    Your additional public IPs should have the same subnet mask necessary for your public segment... with 20+ IPs you likely have a 255.255.255.224 netmask, but just check your border router to see what it really is.

    Regarding the NAT... your DNAT will make internal hosts accessible via their pubic IPs, and when sessions are *initiated* from the public side to these hosts, any "reply" traffic will go back out from the corresponding public IP. However, when the internal host *initiates* an outbound connection, it will NOT be NATed to the associated public IP, but instead will use the IP you are masquerading to.

    If you want a "one to one" NAT that goes in both directions... that is, traffic to a public IP gets NATed to a specific internal host, and all traffic *from* the internal host gets NATed to a specific pubic IP, you need to define an SNAT for the host as well. You basically need a pair of DNAT/SNAT rules per internal host that you want to "static NAT" this way.

    By the way, don't make the mistake of thinking the "full" NAT option is for this purpose.. it will not help in any way getting around the need for two NAT rules. The full NAT feature is to make packets arriving from the public network to look like they were initiated at the ASG itself, to get around default gateway issues on certain network configurations.

    Jim
  • Thanks for the info guys..
    I'll try using both DNat and Snat together. See if that works for us.