Skip to content

Instantly share code, notes, and snippets.

@trajakovic
Last active August 29, 2015 14:04
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 trajakovic/ea12a8a99fc4bbbcdeeb to your computer and use it in GitHub Desktop.
Save trajakovic/ea12a8a99fc4bbbcdeeb to your computer and use it in GitHub Desktop.
nf_conntrack - remove NAT modules
#!/bin/bash
#check if this script is running in su mode
func_check_for_root() {
if [ ! $( id -u ) -eq 0 ]; then
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7
fi
}
func_check_for_root
#remove modules
/sbin/rmmod iptable_nat
/sbin/rmmod ipt_MASQUERADE
/sbin/rmmod nf_nat
/sbin/rmmod nf_conntrack_ipv4
/sbin/rmmod nf_conntrack
/sbin/rmmod nf_defrag_ipv4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment