Convert my old iptables to firewalld

Support for security such as Firewalls and securing linux
Post Reply
kessoron
Posts: 1
Joined: 2016/05/11 00:34:31

Convert my old iptables to firewalld

Post by kessoron » 2016/05/11 00:36:52

Hi,

can someone help me with converting my iptables rules to firewalld ?
this is all i got:

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [14:1536]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 2288 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1935 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8086 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8084 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8085 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8088 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5000 -j ACCEPT
-A INPUT -p udp -m udp -j ACCEPT
-A INPUT -p udp -m udp --dport 5000 -j ACCEPT
-A INPUT -p udp -m udp --dport 7000 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icml-host-prohibited
COMMIT


I know how to do all the port what i miss is this:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [14:1536]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p udp -m udp -j ACCEPT
-A INPUT -p udp -m udp --dport 5000 -j ACCEPT
-A INPUT -p udp -m udp --dport 7000 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icml-host-prohibited
COMMIT



Thanks!!!!

Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: Convert my old iptables to firewalld

Post by Kunwar » 2016/05/18 18:19:46

Sure I can try to help with this but to better understand the situation I would need to ask few questions.

1. Are you doing this on a live server?
2. Do you have selinux enabled?
3. What's the status of firewalld?

Post Reply

Return to “CentOS 7 - Security Support”