How it works...

In the preceding example, we used Iptables in Linux to configure firewalls on our system.

First, we went through the basic options of the iptables command, and then we saw how to add different rules in iptables. We added rules to allow localhost access and outgoing active connections. Then, we added a rule to allow for SSH connection.

Then, we added the rule to deny every other incoming packet that does not match the aforementioned applied rules.

Lastly, we used the iptables-persistent package to save the rules of iptables even after system reboot.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.120.109