Example, to enable TCP port 514
RHEL 7
# firewall-cmd --permanent --add-port 514/tcp firewall-cmd --reload
CentOS 6 and RHEL 6
# iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 514 -j ACCEPT service iptables save
#
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 514 -j ACCEPT service iptables save