summaryrefslogtreecommitdiff
blob: 04fdc071e4aec31beb459ce7cfe96329cdc72ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/sbin/runscript
# $Header: /var/cvsroot/gentoo-x86/net-misc/monmotha/files/monmotha.rc6,v 1.1 2002/08/21 02:23:27 agenkin Exp $
# Copyright 2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Maintainer: Johannes Findeisen <you@hanez.org>

depend() {
	need net
}

start() {
	ebegin "Starting the MonMotha Firewall"
	
	/etc/monmotha/monmotha > /var/log/monmotha.log
	
	eend $?
}

stop() {
	ebegin "Stopping the MonMotha Firewall"

	# RESET ALL IPTABLES STUFF

	/sbin/iptables -P INPUT ACCEPT
	/sbin/iptables -P FORWARD ACCEPT
	/sbin/iptables -P OUTPUT ACCEPT

	/sbin/iptables -t nat -P PREROUTING ACCEPT
	/sbin/iptables -t nat -P POSTROUTING ACCEPT
	/sbin/iptables -t nat -P OUTPUT ACCEPT

	/sbin/iptables -t mangle -P PREROUTING ACCEPT
	/sbin/iptables -t mangle -P OUTPUT ACCEPT

	/sbin/iptables -F
	/sbin/iptables -t nat -F
	/sbin/iptables -t mangle -F

	/sbin/iptables -X
	/sbin/iptables -t nat -X
	/sbin/iptables -t mangle -X
	
	eend $?
}