After several hours spent studying the functioning of IPTABLES Linux, I created a script that builds a firewall for a PC connected to the Internet.
The latter has the following characteristics:
* Prohibits any package to return the machine
* Log everything that tries to return the machine
* Allows the output http, https, ssh, ftp, ftp-data, pop, smtp, nntp, MSN and bittorrent
* Prohibits ping your IP address
* Allows you to ping the others by cons
* Lets you walk safely on your local network
To better understand how it works, I invite you to read the source code, which contains comments from me.
Download the script: iptables script
To install, type the following commands as root:
chmod 700 firewall.sh
echo “/root/firewall.sh” >> /etc/rc.local