RHEL7/CentOS7 features a new firewalld
firewall service, that replaces the iptables service
(both of which use iptables
tool to interact with kernel's Netfilter underneath).
firewalld
can be easily tuned to block incoming traffic, but as noted by Thomas Woerner 1,5 years ago "limiting outgoing traffic is not possible with firewalld in a simple way at the moment". And as far as I can see the situation hasn't changed since then. Or has it? Is there any way to block outgoing traffic with firewalld
? If not are there any other "standard" ways (on RHEL7 distro) of blocking outgoing traffic except manually adding rules through iptables
tool?
Best Answer
I didn't find any option in that nice GUI, but it is possible via direct interface
To enable only outgoing port 80:
This will add it to permanent rules, not the runtime rules.
You will need to reload permanent rules so they become runtime rules.
to display permanent rules
to display runtime rules