All pastes #476376 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-08 01:15 UTC
rendered paste body
#!/bin/bash
# forward ports
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT 	# SSH
sudo iptables -A INPUT -p tcp --dport 5900 -j ACCEPT	# VNC
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT	# Apache
sudo iptables -A INPUT -p tcp --dport 46347 -j ACCEPT	# BitTorrent
# allow ping
sudo iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
# let everything on loopback through
sudo iptables -A INPUT -i lo -j ACCEPT
# allow all local network traffic
sudo iptables -A INPUT -i eth0 -s 10.27.1.0/24 -j ACCEPT
# allow anything at all from upstairs/downstairs work IPs
sudo iptables -A INPUT -s 62.190.244.193 -j ACCEPT
sudo iptables -A INPUT -s 82.111.176.9 -j ACCEPT
# allow all connections that are already established
sudo iptables -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# drop everything else
sudo iptables -A INPUT -j DROP