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

Configuration Considerations - Rules- Masquerading

Hi, I am also new at Firewall setups. Is there anything in particular that I should be aware of when setting up my firewall for the following:

We are a company with 7 Branch offices. At the time our ISP provides us the VPN Service. 
Location 1  10.0.0.0
Location 2  10.0.2.0
Location 3  10.0.3.0 etc...
Location 7 192.168.0.0

All of these locations will be passing through the ASL 4.0 at location 1. We have no internal Mail servers, webservers. But each location has to be able to send and receive to eachother and Access the internet. Our old firewall has Masquerading and  an http proxy and I need to configure the new like the old one. Is the anyone that can give me tips as to which rules I need to have and other considerations? Especially for Location 7: They need to be able to access our VPN. How do I set it up so that their packets will be accepted.

Thanks a bunch!
Janet  


This thread was automatically locked due to age.
Parents
  • Janet-

    How soon do you have to do this? I could suggest some reading, but maybe you want to consider working with what Astaro calls a "Solution Partner". You can do it using information gleaned here, but what if you forget to mention something and one of your branch offices gets infiltrated because of the answers given with the information we had to go on?

    If you have time, I and others will suggest to you some initial recommended reading; when you're done with it, I doubt you will have many questions (but you will still have a few, I'm sure). If you don't have time, then we would have to start with a knowledge of the inventory of the applications being used in each of the branch offices.

    [I would prefer that you would work with one of the resellers who are knowledgeable and would be willing to share that knowledge with you, if you can; it's not like you are just putting your home machine at risk with your possible lack of knowledge of some of the issues...]
       
  • And then this comes:

    AcceptLocal()
    {
        ${IPTABLES} -A INPUT  -j ACCEPT -i \! ${INTERFACE}
        ${IPTABLES} -A OUTPUT -j ACCEPT -o \! ${INTERFACE}
        ${IPTABLES} -A FORWARD -j ACCEPT -i \! ${INTERFACE} \
                -o \! ${INTERFACE}
        ${IPTABLES} -A FORWARD -j destroy -i ${INTERFACE} \
                -o ${INTERFACE}
    }


    #
    # Ab hier kommen die funktionen die von dem Startscript aufgerufen werden
    #


    Start()
    {
        # erstmal alles dichtmachen, den 'muelleimer' erstellen ...
        Close
        CreateBucket
        EgressFilter
        AcceptLocal
        # Masquarading aktivieren
        
        ${IPTABLES} -t nat -A POSTROUTING -s ${LOCAL} -o ${INTERFACE} -j MASQUERADE
        
        # Hier gehts jetzt mit den eigentlichen Regeln los
        
        # InOutTCP  22                 # ssh benutzen wir nicht
         InTCP auth    # manche? ftp server brauchen auth 

       # der ganze html Kram
        OutTCP       https http    # ssl Verbindungen direkt
        TransProxTCP http     # normales http ueber Squid

        #Oeffne Ports 1433 und 1434 fuer die Kommunikation der SQL Server
        OpenSQLTraffic
        
        OutTCP      smtp pop3 nntp 
        # OutTCP    871             # sup
        # OutTCP                    # realplayer
        # OutTCP    cvspserver
        # OutTCP    6667            # IRC
        
        
        OutFTP
        
        OutTCP 3001 # Nessus Client
        OutTCP      2703            # SPAMNET    
            InOutTCP    1723            # SAP SS-CH 
        
        
        OutTCP      3200:3399       # SAP GUI 

        # Oeffne aller Ports testweise
        # InOutTCP 1:12000
     
        OutEqualUDP ntp             # Network Time Protokoll

        InOutUDP 53       # DNS
        InOutTCP 53    # DNS
        
        
        

        # Firewall ICMP. ICMP is useful so allow any by default.
        ${IPTABLES} -A INPUT   -j ACCEPT -p icmp
        ${IPTABLES} -A OUTPUT  -j ACCEPT -p icmp
        ${IPTABLES} -A FORWARD -j ACCEPT -p icmp

        ${IPTABLES} -A INPUT  -j destroy
        ${IPTABLES} -A OUTPUT -j destroy
    }

    Flush()
    {
        ${IPTABLES} -P INPUT $1
        ${IPTABLES} -P OUTPUT $1
        ${IPTABLES} -P FORWARD $1
        ${IPTABLES} -F
        ${IPTABLES} -F INPUT 
        ${IPTABLES} -F OUTPUT 
        ${IPTABLES} -F FORWARD
        ${IPTABLES} -t nat -F 
        ${IPTABLES} -X destroy     > /dev/null 2>&1
        ${IPTABLES} -X in_private  > /dev/null 2>&1
        ${IPTABLES} -X out_private > /dev/null 2>&1
    }    
  • The  highlights of what you are showing is that he has rules for:
    • HTTP and HTTPS outbound, for web browsing
    • FTP outbound, for file downloads (usually done from a browser, though not always)
    • SQL (Are you accessing SQL servers outside your LAN via the Internet?? Are you hosting SQL servers for Internet access??)
    • SMTP, POP, NNTP outbound, for messaging clients (turn off the NNTP if nobody uses it)
    • Nessus outbound (I think that one you won't need)
    • SpamNet (2703) outbound, a spam blocking service
    • PPTP for telecommuting; see if anybody requires a PPTP connection to an internal server; if not, you can try using Astaro's built-in PPTP VPN
    • SAP (3200:3399) outbound (this rule looks like it needs tightening to just a specifc destination server or servers)
    • NTP outbound, used to synchronize computer clocks
    • DNS (you could use Astaro's built-in DNS proxy, which would obviate the need for this rule)
    • ICMP inbound and outbound, used for network troubleshooting (I prefer to turn this off once the firewall has been shown to work...)
    [/list]

    The script also indicates that elementary NAT masquerading is being done.

         
Reply
  • The  highlights of what you are showing is that he has rules for:
    • HTTP and HTTPS outbound, for web browsing
    • FTP outbound, for file downloads (usually done from a browser, though not always)
    • SQL (Are you accessing SQL servers outside your LAN via the Internet?? Are you hosting SQL servers for Internet access??)
    • SMTP, POP, NNTP outbound, for messaging clients (turn off the NNTP if nobody uses it)
    • Nessus outbound (I think that one you won't need)
    • SpamNet (2703) outbound, a spam blocking service
    • PPTP for telecommuting; see if anybody requires a PPTP connection to an internal server; if not, you can try using Astaro's built-in PPTP VPN
    • SAP (3200:3399) outbound (this rule looks like it needs tightening to just a specifc destination server or servers)
    • NTP outbound, used to synchronize computer clocks
    • DNS (you could use Astaro's built-in DNS proxy, which would obviate the need for this rule)
    • ICMP inbound and outbound, used for network troubleshooting (I prefer to turn this off once the firewall has been shown to work...)
    [/list]

    The script also indicates that elementary NAT masquerading is being done.

         
Children
  • Thanks for deciphering! Can you tell me how/where I can define for example the code:
    OutTCP
    InOutTCP

    I haven't seen a menu where I can determine the direction the packets travel other than in the rules, but there I cannot assign any ports and vice-versa. 

    Would be grateful for another answer from you.

    Thanks in advance for your help!    
  • "OutTCP" would be a rule From Internal to Any
    "InOutTCP" would be two rules: From Internal to Any,
    From Any to Internal

    Again, I decoded the script above to simplify matters for when you enlist a professional. Your inexperience at doing this puts at risk your entire company (though I feel given sufficient time and study, you could be qualified to do this).

    Setting up a firewall is a great place to start with computer security in a company, but that's what it is; only a start. Many people erroneously think that firewalls are a silver bullet for their security issues; and getting AntiVirus is not the comprehensive solution either. You have to configure applications for stringent security, monitor logs, etc. -all information you can glean from working with a competent "Solution Partner".

    To give you an understanding as to what you are up against (and the things firewalls do not take care of), I recommend that you read Malicious Mobile Code by Roger Grimes [O'Reilly Press]

      
  • Sec. I appreciate your honesty and  will take your advice. Nonetheless, I find this area to be of great interest but I think I will leave the nitty-gritty to the pros. Have already made contact with a Solution Partner and have a quote laying on my desk. Thanks for your patience and keep up the good advice.
     [:)]