about summary refs log tree commit diff stats
path: root/core/conf/rc.d
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-09-11 01:13:16 +0100
committerSilvino Silva <silvino@bk.ru>2016-09-11 01:13:16 +0100
commitd4f02214d7262e85e42cacc25c2ba77d8dd89c19 (patch)
treec58c1d674a4e0974565185239b2ceb18e9cfdeee /core/conf/rc.d
parentf7994fd3e7ed3d00838022f7ab63b9f849528f04 (diff)
downloaddoc-d4f02214d7262e85e42cacc25c2ba77d8dd89c19.tar.gz
network iptables and resolver revision
Diffstat (limited to 'core/conf/rc.d')
-rw-r--r--core/conf/rc.d/iptables31
1 files changed, 31 insertions, 0 deletions
diff --git a/core/conf/rc.d/iptables b/core/conf/rc.d/iptables
new file mode 100644
index 0000000..d3bbc9b
--- /dev/null
+++ b/core/conf/rc.d/iptables
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# /etc/rc.d/iptables: load/unload iptable rules  
+#
+
+case $1 in
+start)
+  	echo "Starting IPv4 firewall filter table..."
+	/usr/sbin/iptables-restore < /etc/iptables/rules.v4	
+	;;
+stop)
+	echo "Stopping firewall and deny everyone..."
+ 	/usr/sbin/iptables -F
+        /usr/sbin/iptables -X
+        /usr/sbin/iptables -t nat -F
+        /usr/sbin/iptables -t nat -X
+        /usr/sbin/iptables -t mangle -F
+        /usr/sbin/iptables -t mangle -X
+        /usr/sbin/iptables -P FORWARD DROP
+        /usr/sbin/iptables -P OUTPUT DROP
+	;;
+restart)
+	$0 stop
+	$0 start
+	;;
+*)
+	echo "usage: $0 [start|stop|restart]"
+	;;
+esac
+
+# End of file