Improving scripts and setups
authorrtrimana <rtrimana@uci.edu>
Fri, 16 Jun 2017 22:28:03 +0000 (15:28 -0700)
committerrtrimana <rtrimana@uci.edu>
Fri, 16 Jun 2017 22:28:03 +0000 (15:28 -0700)
sentinel_setup/rc.local [new file with mode: 0644]
sentinel_setup/setup/clean
sentinel_setup/setup/show
sentinel_setup/setup/startup.sh

diff --git a/sentinel_setup/rc.local b/sentinel_setup/rc.local
new file mode 100644 (file)
index 0000000..bc39028
--- /dev/null
@@ -0,0 +1,16 @@
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+#!/bin/sh -e
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exec 2> /tmp/rc.local.log      # send stderr from rc.local to a log file
+exec 1>&2                              # send stdout to the same log file
+set -x                                 # tell sh to display commands before execution
+
+# Sleep and run brctl on the background
+sleep 20 && /usr/sbin/brctl hairpin br-wifi wlan0 on && /usr/sbin/brctl hairpin br-wifi wlan1 on &
+sleep 20 && /root/setup/startup.sh &
+
+exit 0
index 99641e2734e256c2a6675fcacc8bb50060c82113..0c3fb63dfb349ecc04eeb88f72cbcc869b567876 100755 (executable)
@@ -2,6 +2,6 @@ iptables -t filter -F
 iptables -t filter -X
 iptables -t nat -F
 iptables -t nat -X
-iptables -t raw -F
-iptables -t raw -X
+#iptables -t raw -F
+#iptables -t raw -X
 
index 42a25ae96cf0d670be8abeccab37235973c44b9f..f1e3ea48025d4328358e2ce0a8996a3b6dd4a7c5 100755 (executable)
@@ -2,3 +2,5 @@
 #iptables -vL -t nat
 #iptables -vL -t mangle
 iptables -L
+iptables -t nat -L
+iptables -t mangle -L
index fee2e028f242fd0e1229b89eb126fd87e4168e20..2c0813950ce2ce7cd582d281426640e6faf49fcd 100755 (executable)
@@ -4,9 +4,9 @@
 iptables -A POSTROUTING -t mangle -p udp --dport 68 -j CHECKSUM --checksum-fill
 
 # Do block ARP from ESP8266 to itself to avoid DHCPDECLINE
-arptables -A INPUT -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
-arptables -A OUTPUT -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
-arptables -A FORWARD -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
+#arptables -A INPUT -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
+#arptables -A OUTPUT -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
+#arptables -A FORWARD -j DROP --source-mac 18:fe:34:db:59:72 --destination-mac 18:fe:34:db:59:72
 
 # block everything except ssh, icmp, http, and dhcp
 # Configure NAT