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.
Parents
  • 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,
     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
  • 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.
Reply
  • 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.
Children

  • 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