Skip to content

Instantly share code, notes, and snippets.

@NSLog0
Created January 9, 2017 16:19
Show Gist options
  • Save NSLog0/d56a808dc6d3fb1403439d97d281d99d to your computer and use it in GitHub Desktop.
Save NSLog0/d56a808dc6d3fb1403439d97d281d99d to your computer and use it in GitHub Desktop.
iptables -A INPUT -s <ip-address> -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -d <ip-address> -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment