Skip to content

Instantly share code, notes, and snippets.

@imjamespond
Last active March 1, 2018 03:54
Show Gist options
  • Save imjamespond/57b74f61dda63583580474898ed0acca to your computer and use it in GitHub Desktop.
Save imjamespond/57b74f61dda63583580474898ed0acca to your computer and use it in GitHub Desktop.
firewall add port
iptables tcp connection log
firewall-cmd --permanent --zone=public --add-port=9092/tcp
firewall-cmd --reload
firewall-cmd --zone=public --list-all
iptables -N INBOUND
iptables -A INPUT -i venet0 -p tcp -m state --state ESTABLISHED,RELATED -j INBOUND
iptables -A INBOUND -p tcp -j LOG --log-prefix ' INBOUND TCP ' --log-level 4 -m limit --limit 5/min
iptables -A INBOUND -p tcp -j ACCEPT
tail -f /var/log/messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment