about summary refs log tree commit diff stats
path: root/core/conf/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'core/conf/rc.d')
-rw-r--r--core/conf/rc.d/iptables7
-rwxr-xr-xcore/conf/rc.d/net22
2 files changed, 15 insertions, 14 deletions
diff --git a/core/conf/rc.d/iptables b/core/conf/rc.d/iptables
index c2061db..44f6bb2 100644
--- a/core/conf/rc.d/iptables
+++ b/core/conf/rc.d/iptables
@@ -3,17 +3,18 @@
 case $1 in
 	start)
 	    echo "clear all iptables tables"
-            bash /etc/iptables/ipt-start.sh
+            #nohup bash /etc/iptables/ipt-start.sh &
+            nohup bash /etc/iptables/ipt-start.sh &
 	;;
         stop)
 	    echo "clear all iptables tables"
-            bash /etc/iptables/ipt-stop.sh
+            nohup bash /etc/iptables/ipt-stop.sh &
 	;;
 	restart)
         $0 start
         ;;
 	status)
-		/usr/sbin/iptables -v
+		/usr/sbin/iptables -L -n -v
 	;;
 	*)
 	    echo "Usage: $0 [start|stop]"
diff --git a/core/conf/rc.d/net b/core/conf/rc.d/net
index 07c46a5..a4c566a 100755
--- a/core/conf/rc.d/net
+++ b/core/conf/rc.d/net
@@ -8,15 +8,20 @@ TYPE="DHCP"
 
 # For "static" connections, specify your settings here:
 # To see your available devices run "ip link".
-DEV=enp11s0
+DEV=ens3
 ADDR=192.168.1.100
 MASK=24
 GW=192.168.1.1
 
 # Optional settings:
-#DHCPOPTS="-h $(/bin/hostname) -C resolv.conf $DEV"
 DHCPOPTS="-t 10"
 
+/sbin/ifconfig dummy down > /dev/null 2>&1
+/sbin/ifconfig dummy0 down > /dev/null 2>&1
+/sbin/ifconfig ifb0 down > /dev/null 2>&1
+/sbin/ifconfig ifb1 down > /dev/null 2>&1
+/sbin/ifconfig bond0 down > /dev/null 2>&1
+
 case $1 in
 	start)
 		if [ "${TYPE}" = "DHCP" ]; then
@@ -31,15 +36,9 @@ case $1 in
 		if [ "${TYPE}" = "DHCP" ]; then
 			/sbin/dhcpcd -x
 		else
-			#/sbin/ip route del default
-			#/sbin/ip link set ${DEV} down
-			#/sbin/ip addr del ${ADDR}/${MASK} dev ${DEV}
-
-                        /sbin/ip route del default dev ${DEV}
-                        /sbin/ip route flush dev ${DEV}
-                        /sbin/ip link set ${DEV} down
-                        /sbin/ip addr flush dev ${DEV}
-
+			/sbin/ip route del default
+			/sbin/ip link set ${DEV} down
+			/sbin/ip addr del ${ADDR}/${MASK} dev ${DEV}
 		fi
 		;;
 	restart)
@@ -52,3 +51,4 @@ case $1 in
 esac
 
 # End of file
+