Skip to content

Instantly share code, notes, and snippets.

View joebarbere's full-sized avatar
Energized

Joe Barbere joebarbere

Energized
View GitHub Profile
@joebarbere
joebarbere / web_iptables.sh
Created July 26, 2012 01:16
web iptables
#!/bin/bash
# Flush all current rules from iptables
iptables -F
# Allow established connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow HTTP
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
@joebarbere
joebarbere / mongodb_iptables.sh
Created July 26, 2012 01:15
mongodb iptables
#!/bin/bash
# Flush all current rules from iptables
iptables -F
# Allow established connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow MongoDB
iptables -A INPUT -s 10.182.226.217 -p tcp --dport 27017 -j ACCEPT