summaryrefslogtreecommitdiff
blob: 47fdb598304f34502257ee6ca0c369baed9af47b (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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ipac-ng/files/ipac-ng.rc.1.30,v 1.1 2004/07/27 08:50:13 eldad Exp $

depend() {
	need net logger
}

start() {
	ebegin "Setting up ipac-ng iptables chains"
	/usr/sbin/fetchipac -S
	/usr/sbin/fetchipac
	eend $?
}

stop() {
	## fetch so we dont lose data
	/usr/sbin/fetchipac

	IPT=/sbin/iptables
	ebegin "Removing ipac-ng iptables settings"

	${IPT} -D INPUT -s 0/0 -d 0/0 -j ipac~o
	${IPT} -D OUTPUT -s 0/0 -d 0/0 -j ipac~i
	${IPT} -D FORWARD -s 0/0 -d 0/0 -j ipac~fi
	${IPT} -D FORWARD -s 0/0 -d 0/0 -j ipac~fo
	
	${IPT} -F ipac~i
	${IPT} -F ipac~o
	${IPT} -F ipac~fi
	${IPT} -F ipac~fo
	
	${IPT} -X ipac~i
	${IPT} -X ipac~o
	${IPT} -X ipac~fi
	${IPT} -X ipac~fo

	rm -f /var/run/ipac.rules /var/run/ipac.status

	eend $?
}