diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/monmotha/files/monmotha.rc6 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/monmotha/files/monmotha.rc6')
-rw-r--r-- | net-misc/monmotha/files/monmotha.rc6 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net-misc/monmotha/files/monmotha.rc6 b/net-misc/monmotha/files/monmotha.rc6 new file mode 100644 index 000000000000..9bd0eeb8e2b1 --- /dev/null +++ b/net-misc/monmotha/files/monmotha.rc6 @@ -0,0 +1,40 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 $? +} |