Comments on: How to Set Up a Firewall with iptables on Ubuntu and CentOS https://www.rosehosting.com/blog/how-to-set-up-a-firewall-with-iptables-on-ubuntu-and-centos/ Premium Linux Tutorials Since 2001 Fri, 03 Jun 2022 08:42:12 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: admin https://www.rosehosting.com/blog/how-to-set-up-a-firewall-with-iptables-on-ubuntu-and-centos/#comment-46439 Sat, 23 Dec 2017 15:32:32 +0000 https://www.rosehosting.com/blog/?p=21988#comment-46439 In reply to John.

Nice catch. We updated the tutorial.

]]>
By: John https://www.rosehosting.com/blog/how-to-set-up-a-firewall-with-iptables-on-ubuntu-and-centos/#comment-46436 Fri, 22 Dec 2017 21:04:55 +0000 https://www.rosehosting.com/blog/?p=21988#comment-46436 Under the section where it says “If you have other services that you want to allow access to it is best to do that now. Once you are done, you can set the default policy for the INPUT built-in chain to DROP.” there is a command below that reads:
iptables -A INPUT DROP

This should say iptables –
iptables A INPUT -j DROP

Without the -j the system doesn’t know what to do with the “DROP” and therefore returns an error of:

“root@mysystem:~# iptables -A INPUT DROP
Bad argument `DROP’
Try `iptables -h’ or ‘iptables –help’ for more information.”

]]>