DIGIT-ARC read-only archive · snapshot: July 23, 2026

Whitelist and Blacklist IP's in CentOS 7

2 posts · originally from https://geek.digit.in/community/threads/whitelist-and-blacklist-ips-in-centos-7.187535/

krishnandu.sarkar
krishnandu.sarkar Original post #1
Oct 7, 2014 at 11:20 PM
I want to setup CentOS 7 firewall such that, all the incoming requests will be blocked except from the originating IP's that I whitelist. And for the Whitelist IP's all the ports should be accessible. Can anyone guide me for that?

I'm able to find few solutions (not sure whether they will work) for iptables. But CentOS 7 uses firewalld. So can't find something similar to achieve with firewall-cmd command.

The interfaces are in Public Zone. I have also moved all the services to Public zone already.