In a CentOS 7 web server, how do I configure firewalld to block all but a specific list of ip addresses from making successful http or https requests?
I know that I can use
httpd.conf to restrict by ip, but how can I get firewalld to restrict by ip? What file? Do I use
firewall-cmd? What syntax?
I imagine this involves creating one or more rich rules, which are described in the documentation. But I want to make sure that I do this properly. For example, would one rule specify rejecting all http/s requests from anyone? And then would another rule be required to approve http/s requests for each specific ip? Would the rule be for the service http/s, or would the rule be for the port 443? Or some combination? What about logging the rejections and acceptances?