[CentOS] Iptables rules not working

Thu Jul 16 15:54:04 UTC 2020
Alexander Dalloz <ad+lists at uni-x.org>

Am 16.07.2020 um 17:48 schrieb Kaushal Shriyan:
> Hi,
> I am running CentOS Linux release 8.2.2004 (Core) on a remote server. I am
> running the below iptables command to allow SSH port 22 from a specific
> source IP
> iptables -A INPUT -m tcp -p tcp -s --dport 22 -j ACCEPT
>> service iptables save
> The above iptables ruleset is not working and I am still able to connect
> from the internet to SSH port 22. I look forward to hearing from you and
> thanks in advance.
> Best Regards,
> Kaushal

Please consult the documentation to understand how to use the firewall 
on CentOS 8:


In short: you are doing it wrong in multiple dimensions.