Monday, December 28, 2009

iptables for ssh and gmote

Run these commands to open up incoming SSH and Gmote through iptables. Be sure to open the appropriate port/ip combination in the router.

SSH:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT

Gmote (port 8889):
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8889 -j ACCEPT

I think it works to run simultaneously, but I haven't tested it yet.

No comments: