I've never used firewalld before, and I'm being asked to set up some local firewall rules to allow/prevent specific traffic.
Basically, I have some systems in a protected network. This network allows incoming traffic from a number of sources over a number of ports. Whatever else happens, I can't accidentally block any of the existing traffic.
On top of that, there is one particular application running on 2 specific servers on this protected subnet and they talk to each other over 3 different tcp ports.
The ask is that I don't block anything from anywhere except that, for these 3 ports, only these 2 servers should be able to communicate.
Everything I've tried in firewalld seems to make it so that all traffic is allowed, or none, or only traffic to that port is allowed or not. But I can't figure out how to allow all traffic except X and only allow X between two specific IP's.
I hope this all makes sense.
Rule 1 --> All traffic allowed except tcp ports 10000, 10010, 10020
Rule 2 --> Ports 10000, 10010, 10020 allowed between server1 and server2 only
Rule 3 --> Ports 10000, 10010, 10020 denied from all other sources