firewalld rule to block all outside traffic except certain subnet for http/https

Posted on

I am looking for a rule, that will block all incoming traffic NOT from a particular subnet, such as 192.168.0.0/24 for http/https connections.
I guess the service might not matter, as long as I can stop all incoming traffic not on my subnet.

I've tried a number of different rules and rich rules. I tried setting rule up in the external zone, as well.

I can't seem to find the right string that will allow me to do this.

Responses