#!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 depend() { need net use logger after sshd } setipacct() { ${RMMOD} ipchains 1>/tmp/vhcs2_network.log 2>/tmp/vhcs2_network.err.log # all traffic /sbin/iptables -I INPUT /sbin/iptables -I OUTPUT # web traffic /sbin/iptables -I INPUT -p tcp --dport 80 /sbin/iptables -I OUTPUT -p tcp --sport 80 # pop3 traffic /sbin/iptables -I INPUT -p tcp --dport 110 /sbin/iptables -I OUTPUT -p tcp --sport 110 # imap traffic /sbin/iptables -I INPUT -p tcp --dport 143 /sbin/iptables -I OUTPUT -p tcp --sport 143 # mail traffic /sbin/iptables -I INPUT -p tcp --dport 25 /sbin/iptables -I OUTPUT -p tcp --sport 25 } start() { ebegin "Starting VHCS2" start-stop-daemon --start --verbose --exec ${DAEMON} -- -p ${PID} setipacct eend $? } stop() { ebegin "Stopping VHCS2" start-stop-daemon --stop --verbose --pidfile ${PID} --exec ${DAEMON} eend $? }