Skip to content

Instantly share code, notes, and snippets.

@brianray
Created January 28, 2014 20:42
Show Gist options
  • Save brianray/8675933 to your computer and use it in GitHub Desktop.
Save brianray/8675933 to your computer and use it in GitHub Desktop.
$ ifconfig | grep "inet addr"
inet addr:10.118.242.82 Bcast:10.118.242.127 Mask:255.255.255.128
inet addr:127.0.0.1 Mask:255.0.0.0
$ sudo iptables -L INPUT -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8000
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
ACCEPT tcp -- 10.118.242.88 0.0.0.0/0 tcp dpt:27017 state NEW,ESTABLISHED
ACCEPT tcp -- 10.16.98.110 0.0.0.0/0 tcp dpt:27017 state NEW,ESTABLISHED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment