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

Firewall/Routing Issues

Hello

I'm trying to implement a 220 firewall instead of our existing iptables (ClearOS) based firewall machine (it's a bit unstable)

Our setup is primarely based on a DMZ and a internal LAN

Our hosting provider hosts the network gateway (.1) because we are doing some telephony services, and we have not direct access to this.

All our servers (primarely application and web servers) are connected via the DMZ and have a external ip defined (ex: 10.20.30.10) (not the real ip)

Our database servers is placed in the LAN with 192.168.0.* adresses.

I've tried to illustrate the setup in the attached document.

I have replicated all the forward rules from our old firewall into the "Firewall -> Rules" section along with a couple of DNAT rules.

Ex could be  ->  ->  allow

I have also made some  ->  ->  ALLOW rules

But when i try to replace the old firewall with this, nothing works, and the log displays everything is Default DROP'ed

What am i missing? Static Routes?

Please advice


This thread was automatically locked due to age.
  • Hi,
     a MASQ rule will cover all outgoing traffic

    internal network1 -> external interface
    internal network2 -> external interface

    Packet filter rules
    internal network1 -> any -> any -> allow
    internal netwotk2 -> any -> any -> allow

    If you have external access to your webserver then you will need to setup incoming DNAT with auto packet filter creation ticked.

    Both internal interfaces should be able to see each other.

    Ian M
  • Hi, mvrasmussen, and welcome to the User BB!

    Please post a few lines from the full (not the Live) Firewall log.  Please show pictures of representative Firewall and NAT rules, and confirm that all Host definitions have 'Interface: >' instead of being bound to an interface.

    Cheers - Bob
  • Hi,
     a MASQ rule will cover all outgoing traffic

    internal network1 -> external interface
    internal network2 -> external interface

    Packet filter rules
    internal network1 -> any -> any -> allow
    internal netwotk2 -> any -> any -> allow


    Will that preserve the correct outgoing ip? so if my 10.20.30.86 server contacts some ip on the internet, it goes as 10.20.30.86, and not just the ip of the gateway


    If you have external access to your webserver then you will need to setup incoming DNAT with auto packet filter creation ticked.

    I have many servers with incoming access, but in the old firewall it is only defined as FORWARD rules, i have only a single NAT rule

    One of the forward rules could be:

    iptables -A FORWARD -s  -d 10.20.30.77 -p tcp -m tcp --dport 8000 -j ACCEPT

    To allow the customer to access the .77 server on port 8000
  • Maybe someone more familiar with iptables could comment on the rule you show in Post #4.  I think it's a Firewall rule in Astaro.

    Please provide the information requested in Post #3 above.  You can attach pictures by selecting [Go Advanced] below.

    Cheers - Bob
  • Funny enough, I moved from ClearOS to astaro almost 2 years ago so I MIGHT be of some help.

    Ill just give my 2cents, and hope for the best =)

    For Your Internal Network (lan), you will most likely want to mask your IP address, so I would setup a Masq Rule: 
    {MASQ} Internal -> External Interface

    If you dont want to mask your dmz, dont use one.

    For Firewall Rules, I make it best practice to NOT allow the DMZ to talk to my secure lan. 
    In this kind of relationship:

    • The lan CAN talk to DMZ
    • DMZ CANNOT talk to the Lan
    • Both can talk to the internet

    Lan -> any -> any -> allow
    DMZ -> any -> Lan-> Deny
    DMZ -> any -> any -> allow

    Ofcourse i wouldn't use Any as a Service, and would lockdown on this, but for an example it will do. 
    For Example: You want Your Database Server, Using lets say.. MYSQL, to be accessed by HOST 10.20.30.86
    Host(10.20.30.86)->Mysql->Host(DB Server IP)->Allow


    Now the next thing, i could be wrong, so someone might need to correct me. But im pretty sure from the quote below, its a DNAT statement, as FORWARD is a portforward rule.

    I have many servers with incoming access, but in the old firewall it is only defined as FORWARD rules, i have only a single NAT rule

    IF u've setup your external interface, with Multiple Address (if u want to use multiple public IPS), than a DNAT Rule, should be sufficient. But if you haven't, you might need to Use FULL/SNAT

    So (this if off the top of my head, and assuming this is the first case)

    DNAT Version:
    Source: Any
    Service: Port 8000
    Dest: Public IP
    Rule: DNAT
    Dest Address: .77 address
    Service: (leave blank if u don't want the port to change)
    Automatic PF Rule: Yes


    with SNAT rule: 

    Traffic Source: Web Server
    Traffic Service: Any
    Traffic Destinination: Internet (Object)
    NAT Mode: SNAT
    Source: External
    Source Service: Blank
    Automatic Packet filter: tick


    i dunno how to use the Full nat yet, and this is similar to how i have my main server on dmz setup.

  • For Your Internal Network (lan), you will most likely want to mask your IP address, so I would setup a Masq Rule: 
    {MASQ} Internal -> External Interface

    If you dont want to mask your dmz, dont use one.

    Does this cover the fact that the outgoing trafic from the specific server, also have the right ip?

    For Example: You want Your Database Server, Using lets say.. MYSQL, to be accessed by HOST 10.20.30.86
    Host(10.20.30.86)->Mysql->Host(DB Server IP)->Allow


    This i have, and is also the only thing that should be interconnected between these two networks, mysql (3306) and psql (5432)


    Now the next thing, i could be wrong, so someone might need to correct me. But im pretty sure from the quote below, its a DNAT statement, as FORWARD is a portforward rule.

    I think you are misunderstanding my setup

    I have my cisco gateway .1 -> the astaro -> switch with all the servers, all with external ip's (the 10.20.30 are external ip substitute)

    I dont have a internal ip to NAT into, so in my understanding i only need "Firewall" rules and so i have created

    I have a bunch of network definitions for all of my servers with their ip, and it is bound to the interface they are connected to (DMZ), is that correct?

    Some of them have a specific firewall rule like  ->  ->  ALLOW

    But many are in my HTTP and HTTPS groups where HTTP and HTTPS are allowed ingoing.

    Hope it makes sense
  • in IPv4 land you will need a NAT rule of some sort unless using bridging.

    Ian M
  • Most of my rules are in iptables defined as:

    ex:
    iptables -A FORWARD  -d 10.20.30.90 -p tcp -m tcp --dport 80 -j ACCEPT


    That now i have added in the astaro as: 

    And with a network definition in the "HTTP Enabled" like:

    Should the "interface" be as it is, or ANY?

    I have also created two masqurading rules:

    Is that correct?

    As you can see, in the existing setup, no NAT rules is needed to make it work, so it should be right.
  • I am a little confused here.  The 10.20.30.x addresses are fake for privacy reasons?  I ask because I see the WAN and DMZ are using the same addresses, which doesn't look right.
  • The addresses are confusing for me, too.  To represent internal addresses use things like X.Y.11.22, and, for public IPs, things like 93.A.B.44.

    You're right that you only need Firewall rules.  If your Cisco routes the DMZ subnet via the External interface of the ASG, then you're right you don't need to bridge the Astaro interfaces.  If you use bridging, then you can't use Quality-of-Service.

    The one change I'd make in Corey3443's list of instructions would be to use 'DMZ -> Any -> Internet : Allow' instead of the combination of an Any-Allow rule preceded by a Lan-Drop rule.

    And, Yes, in general, never bind a Host/Network definition to a specific interface.  Always use 'Interface: >' unless otherwise instructed by an Astaro Support Engineer.  Where a definition bound to an interface is needed, that should be done with an Additional Address on the interface, and the WebAdmin-created object, like "Internal [Additional] (Address)", used.  If you have anti-spoofing disabled, then binding definitions to the Internal interface can prevent spoofing by outside devices, but there are a lot of other details that can result in strange behavior.

    Cheers - Bob