Skip to content

Instantly share code, notes, and snippets.

@jrelo
Created September 14, 2019 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrelo/627be29c7ec4cf9d64c947730e3c971d to your computer and use it in GitHub Desktop.
Save jrelo/627be29c7ec4cf9d64c947730e3c971d to your computer and use it in GitHub Desktop.
clear conntracks for IP
/usr/sbin/conntrack -L |grep $1 | grep ESTAB |grep 'dport=$2' | awk '{ system("/usr/sbin/conntrack -D --orig-src '$1' --orig-dst " substr($6,5) " -p tcp --orig-port-src " substr($7,7) " --orig-port-dst $2");}';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment