Basic of iptables

Linux Dec 15, 2019

As a long time user of linux, the major problem is the network security of the system itself.

we all know, linux gives us a very good tool called iptables. My linux distribution is always Debian, it has iptables installed. So i just write down some of my learning experience of iptables.

  1. The filter

The wild wild work web is dangerous, so we use iptables, and we always cares about the incoming packets more, these packets come to our network "input" part. What we should do? just filter it. and the filter part called filter chain totally comes with three tables. They are the INPUTE table OUTPUT table and FORWARD table.The INPUT table handles network packets that come in  our network card we can call it eth0 interface.

How we gone filter a packet that went in our server? rules like below does one thing: when a New state tcp packet comes into our firewall to the 443 port we just let it in.

iptables -t filter -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT

to be continue...

Tags