Common Firewall Rules and Commands in iptables

Today we are going to show you some common firewall rules and commands in iptables. Iptables is a useful command line utility for configuring Linux kernel firewall. Iptables contains five tables: raw, filter, nat, mangle and security. Each table consist of chains. A chain is a list of firewall rules which are followed in order. Let’s get started with some common firewall rules and commands in iptables.

Install iptables

Log in to your VPS via SSH as user root:

ssh root@IP_Address -p Port_number

Installing iptables is very easy. If you have an Ubuntu VPS or a Debian VPS, run the following commands:

Use ‘iptables -h | less’ for more information on all iptables command options.

Of course, you don’t have to install iptables and create firewall rules on your VPS, if you use one of our VPS Hosting solutions, in which case you can simply ask our expert Linux admins to install iptables and configure firewall rules on your VPS. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post about common firewall rules and commands in iptables, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.