IPTABLES

LINUX FIREWALLS

IPATBLES

This is not a reference to IPTABLES in any way it is just a start that i gathered from several other documents with my humble knowledge and experience and i hope it could get you started with the firewalls configuration. This document is far from complete and I'll be adding more as soon as i have the time

General

Before we mention anything about firewalls i need to point out a critical point “a firewall’s power lies within the configuration” meaning that no matter what the firewall application power is, a weak configuration will weaken it.And also remember that security is not just a firewall. Think of a firewall as just a first line of defense you need to secure your applications and keep your system updated and patched for any exploits to secure your applications Mainly a firewall is used to block or allow certain traffic based upon the network needs, it may block all incoming requests or it may allow requests to go through to the mail server within the local network pages

How IPTABLES is configured?

IPTABLES configuration file (/etc/sysconfig/iptables) consists of a set of rules, each line contains one rule There are two ways of creating the config file either by editing the config file directly or by using the #iptables command so here is this document I'll edit the file directly (no reason just that i used to do it both ways are good IPTABLES has 3 tables :

How a rule is built?

A rule is a match criteria applied to the packets in a certain chain that reach the firewall machine. These match criteria are define packet properties and I'll start by giving you the quick steps and some quick notes first then

So how a match is built?

Generally the matches that can be defined are:

Examples