shorewall 101

Starting with shorewall
Shorewall is a high-level firewall solution that uses iptables internally.
  1. shorewall intro
  2. quickstart guide for standalone firewall
  3. shorewall configuration files
  4. shorewall setup guide : in depth guide to setting up a shorewall environment
  5. operating shorewall
Basic Configuration
Config files are in /etc/shorewall. The main ones are:
  • shorewall.conf : general server behaviour parameters
  • zones : list of configured zones (default: 'net' + 'fw') from/to which packages can travel
  • interfaces : associates zones with network interfaces (e.g. 'net' -> eth0)
  • policy : default policy for connections from one zone to another (e.g. "net all DROP $LOG", "fw all ACCEPT $LOG", "all all REJECT $LOG")
  • rules : exceptions to default policies (e.g "ACCEPT net fw tcp 80" where 'ACCEPT' is the action, 'net' is the source zone, 'fw' is the destination zone, 'tcp' the protocol, and '80' the destination port - so this rule opens up port 80 for incoming TCP traffic on eth0)
Shorewall views the network where it is running as being composed of a set of zones. By default, there are 2 zones:
  • fw : the firewall itself
  • net : the internet, by default attached to eth0
The default configuration (policy) is set to DROP all traffic coming in through the "net" zone and to ACCEPT all traffic travelling from "net" to "fw" zone. To change this behaviour, you add rules for specific types of traffic.

Comments

Popular posts from this blog

Handling control characters (escaping) in python for json and mysql

python port sniffer with pcapy and impacket

Django field, form and model validation process