I have a CentOS 7 machine where I'm trying to add some custom firewall rules. I usually use firewalld, so I added them this way:
Code: Select all
firewall-cmd --permanent --direct --add-chain ipv4 filter DOCKER-USER
firewall-cmd --permanent --direct --add-rule ipv4 filter DOCKER-USER 0 -j REJECT -i eth0 -dport 27017
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<direct>
<chain table="filter" ipv="ipv4" chain="DOCKER-USER"/>
<rule priority="0" table="filter" ipv="ipv4" chain="DOCKER-USER">-j REJECT -i
eth0 -dport 27017</rule>
</direct>
Code: Select all
Error: COMMAND_FAILED: Direct: '/usr/sbin/iptables-restore -w -n' failed: iptables-restore v1.4.21: The -t option (seen in line 3) cannot be used in iptables-restore.