Iptables examples
![Skaia minecraft download](https://cdn2.cdnme.se/5447227/9-3/screenshot_4_64e629479606ee5be4b9a969.jpg)
![iptables examples iptables examples](https://www.networxsecurity.org/fileadmin/_processed_/csm_iptables_c71b6872fb.png)
iptables supports additional features via modules, some of which come already preinstalled with iptables and others, such as the geoip module. p tcp set tcp as the protocol this rule will apply to, you can also use other protocols such as udp, icmp or all. A INPUT add a rule to the INPUT chain, a chain is a group of rules, the ones we use most on this guide will be INPUT, OUTPUT and PREROUTING. Syntax sudo iptables -A INPUT -p tcp -m tcp -dport 22 -m geoip -src-cc PE -j ACCEPT Note: Although netstat is a handy to find the ports you want to work with, you should be aware of the applications you currently have installed on your server and which ports are listening, you *do not* have to allow every port you find in the netstat output. On your server you can use the netstat command to see which ports are currently listening for connections. Replace PORT with the port you want to test if it's open (e.g. Replace SERVER_IP with your server address. You can use the netcat command (on a different computer than your server) to test which of your ports are open or closed. sudo apt-get install iptables iptables-persistentĪfter installation, if you are asked whether to save your current rules, it does not matter at the moment because you are going to remove or create new rules later. It comes preinstalled on most Ubuntu distributions, however if you are using a customized Ubuntu version or running inside a container you will most likely have to install it manually. Iptables is a powerful tool used to configure the Linux-kernel's integrated firewall.
![Skaia minecraft download](https://cdn2.cdnme.se/5447227/9-3/screenshot_4_64e629479606ee5be4b9a969.jpg)