Skip to content

Instantly share code, notes, and snippets.

@daubac402
Last active May 24, 2019 06:43
Show Gist options
  • Save daubac402/5ee9218bc4e1820ec677e97c3d6a94d5 to your computer and use it in GitHub Desktop.
Save daubac402/5ee9218bc4e1820ec677e97c3d6a94d5 to your computer and use it in GitHub Desktop.
# CentOS 6
#############################
# Accept port 60006
iptables -I INPUT -p tcp -m tcp --dport 60006 -j ACCEPT
# Save current rules
service iptables save
# Clear input chain
sudo iptables -F INPUT
# Flush the whole iptables
sudo iptables -F
#############################
# CentOS 7
#############################
# Accept port 60006
firewall-cmd --zone=public --add-port=60006/tcp --permanent
firewall-cmd --reload
#############################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment