[wplug] IPTABLES help
Ted Rodgers
ted.d.rodgers at gmail.com
Fri Aug 17 22:29:43 EDT 2012
note the bad line wrap in the other email:
#!/bin/bash
# fix the value between quotes
ssh-port="put your port here"
# allow existing connections and related (requested) traffic
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# allow your ssh connection
iptables -A INPUT -p tcp --dport $ssh-port -j ACCEPT
# set policy to drop all other attempted connects
# note: this is done last so you don't kick yourself out if you do this
# over ssh
iptables -P INPUT -j DROP
# next line is probably not needed since sanity would say it's default
# anyway
iptables -P OUTPUT -j ACCEPT
More information about the wplug
mailing list