From 7ff6b5c63dab61f55310ca9f99a079c5b0627be3 Mon Sep 17 00:00:00 2001 From: rtrimana Date: Thu, 22 Feb 2018 14:48:43 -0800 Subject: [PATCH] Renaming Sentinel to Vigilia; adjusting scripts; adding brctl option in menuconfig for busybox --- README | 35 +++++++++---------- sentinel_setup/setup/transfer | 2 -- .../sentinel.config => vigilia.config | 4 ++- {sentinel_setup => vigilia_setup}/config/dhcp | 0 .../config/firewall.bak | 0 .../config/hostapd-psk | 0 .../config/network | 1 + .../config/wireless | 0 {sentinel_setup => vigilia_setup}/rc.local | 0 .../register/version_1/README | 0 .../register/version_1/devices.dat | 0 .../register/version_1/register_device.sh | 0 .../register/version_2/change_default_pw.sh | 0 .../register/version_2/connect_device.sh | 0 .../register/version_2/register_device.sh | 0 .../sentinel.config | 0 .../clean => vigilia_setup/setup/clean.sh | 2 ++ .../setup/dhcp => vigilia_setup/setup/dhcp.sh | 2 ++ .../setup/nat => vigilia_setup/setup/nat.sh | 2 ++ .../restart => vigilia_setup/setup/restart.sh | 2 ++ .../setup/show => vigilia_setup/setup/show.sh | 2 ++ .../setup/startup.sh | 0 vigilia_setup/setup/transfer.sh | 4 +++ 23 files changed, 34 insertions(+), 22 deletions(-) delete mode 100755 sentinel_setup/setup/transfer rename sentinel_setup/sentinel.config => vigilia.config (99%) rename {sentinel_setup => vigilia_setup}/config/dhcp (100%) rename {sentinel_setup => vigilia_setup}/config/firewall.bak (100%) rename {sentinel_setup => vigilia_setup}/config/hostapd-psk (100%) rename {sentinel_setup => vigilia_setup}/config/network (97%) rename {sentinel_setup => vigilia_setup}/config/wireless (100%) rename {sentinel_setup => vigilia_setup}/rc.local (100%) rename {sentinel_setup => vigilia_setup}/register/version_1/README (100%) rename {sentinel_setup => vigilia_setup}/register/version_1/devices.dat (100%) rename {sentinel_setup => vigilia_setup}/register/version_1/register_device.sh (100%) rename {sentinel_setup => vigilia_setup}/register/version_2/change_default_pw.sh (100%) rename {sentinel_setup => vigilia_setup}/register/version_2/connect_device.sh (100%) rename {sentinel_setup => vigilia_setup}/register/version_2/register_device.sh (100%) rename sentinel.config => vigilia_setup/sentinel.config (100%) rename sentinel_setup/setup/clean => vigilia_setup/setup/clean.sh (91%) rename sentinel_setup/setup/dhcp => vigilia_setup/setup/dhcp.sh (65%) rename sentinel_setup/setup/nat => vigilia_setup/setup/nat.sh (96%) rename sentinel_setup/setup/restart => vigilia_setup/setup/restart.sh (56%) rename sentinel_setup/setup/show => vigilia_setup/setup/show.sh (91%) rename {sentinel_setup => vigilia_setup}/setup/startup.sh (100%) create mode 100755 vigilia_setup/setup/transfer.sh diff --git a/README b/README index 1638446e0a..42f724196e 100644 --- a/README +++ b/README @@ -29,7 +29,7 @@ Sunshine! ================================================================================ This LEDE lede-17.01 branch was taken in July 2017 from the LEDE github -repository for Sentinel system. A few things have been added including a patch +repository for Vigilia system. A few things have been added including a patch for hostapd to make disable_dgaf and proxy_arp options work properly. The followings are the steps to be done to install this correctly on a NETGEAR R7800 @@ -40,8 +40,8 @@ onto your local repository. Then execute "git checkout lede-17.01" to checkout the right branch---this is a detached branch (there is no master branch), so we have to do this to make sure that we can push and pull changes correctly. -2) Copy the compilation configuration file sentinel.config into a .config file in -the main folder by executing "cp sentinel.config .config". +2) Copy the compilation configuration file vigilia.config into a .config file in +the main folder by executing "cp vigilia.config .config". 3) Do "make defconfig" to setup the build options, then do "make world -j", e.g. make world -j12. @@ -53,49 +53,46 @@ https://lede-project.org/docs/guide-quick-start/standardflashinginstructions. 5) After flashing and booting for the first time, we need to set up the router using RJ45 cables; if we plug it into the WAN connection through DHCP mechanism, we can get -an IP address for that WAN port instantly; to set up network configrations, we can +an IP address for that WAN port instantly; to set up network configurations, we can access the router by connecting a device to the router, opening a browser, and typing the default router IP address: http://192.168.1.1; this will open the lUCI configuration page and we can set up the router now. 6) We can set up first the LAN connection according to the LAN configuration -in sentinel_setup/config/network. +in vigilia/config/network. 7) Then we can set up a password for the system by typing "passwd" and giving it a new password. 8) Reboot the system and we can login using dropbear ssh authentication by typing -"ssh root@128.195.204.115" and inputting the password. If we want to use SSL key +"ssh root@128.195.204.94" and inputting the password. If we want to use SSL key for the sake of convenience, then we have to do the steps here: https://wiki.openwrt.org/doc/howto/dropbear.public-key.auth Basically we copy our machine's public-key to the LEDE system by typing: -ssh root@128.195.204.115 "tee -a /etc/dropbear/authorized_keys" < ~/.ssh/id_rsa.pub +ssh root@128.195.204.94 "tee -a /etc/dropbear/authorized_keys" < ~/.ssh/id_rsa.pub 9) We need to copy the setup in dhcp, network, wireless, and hostapd-psk files in -sentinel_setup/config/ into the same files in /etc/config/ on the LEDE system. -Also we need to copy sentinel_setup/rc.local that contains the initial setup scripts +vigilia_setup/config/ into the same files in /etc/config/ on the LEDE system. +Also we need to copy vigilia_setup/rc.local that contains the initial setup scripts into /etc on the LEDE system. For the firewall file, since we do not use the default firewall setup from LEDE, we can do "mv /etc/config/firewall /etc/config/firewall.bak" to make it unreadable by LEDE UCI when it is initializing the firewall rules when the system is booting up. -10) We need to also create /root/sentinel_setup/register and copy the scripts in -sentinel_setup/register/version_2 into it. These Shell scripts work with the -Android app that registers and deletes devices to and fro the router. +10) We need to also create /root/vigilia_setup/register and copy the scripts in +vigilia_setup/register/version_2 into it. These Shell scripts work with the +Android app that registers and deletes devices to and from the router. -11) Last, we need to copy the setup scripts in sentinel_setup/setup into /setup on +11) Last, we need to copy the setup scripts in vigilia_setup/setup into /setup on our LEDE system. This contains a number of scripts. - "startup.sh" will be run by the rc.local script when LEDE is booting up. This script -contains the initial firewall rules for Sentinel router and a number of workaround +contains the initial firewall rules for Vigilia router and a number of workaround rules to fix a few issues when disable_dgaf and proxy_arp options are activated, i.e. -hostapd checksum bug (for disable_dgaf feature) and DHCPDECLINE issue when -a device gets an ARP unicast message about itself, causing it to think that its -IP address has been used by another device (so far only the ESP8266 is known to -have this problem). +hostapd checksum bug (for disable_dgaf feature). - "clean" and "nat" scripts are for cleaning and activating NAT(Network Address Translation) on the system. - "dhcp" shows the IP address assignments to different connected devices. - "show" shows the active iptables rules. - "transfer" contains commands to transfer files through the "scp" command. -13) Reboot the system and we will have a working LEDE router for Sentinel system. +13) Reboot the system and we will have a working LEDE router for Vigilia system. diff --git a/sentinel_setup/setup/transfer b/sentinel_setup/setup/transfer deleted file mode 100755 index 7eaae8067a..0000000000 --- a/sentinel_setup/setup/transfer +++ /dev/null @@ -1,2 +0,0 @@ -scp -r /root/setup rtrimana@128.195.204.132:/home/rtrimana/tmp/temp/LEDE/ -scp -r /etc/config rtrimana@128.195.204.132:/home/rtrimana/tmp/temp/LEDE/ diff --git a/sentinel_setup/sentinel.config b/vigilia.config similarity index 99% rename from sentinel_setup/sentinel.config rename to vigilia.config index ab175d2c92..8c0297a454 100644 --- a/sentinel_setup/sentinel.config +++ b/vigilia.config @@ -1903,7 +1903,9 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y CONFIG_BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS=y # CONFIG_BUSYBOX_CONFIG_ARP is not set # CONFIG_BUSYBOX_CONFIG_ARPING is not set -# CONFIG_BUSYBOX_CONFIG_BRCTL is not set +CONFIG_BUSYBOX_CONFIG_BRCTL=y +CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY=y +CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW=y # CONFIG_BUSYBOX_CONFIG_DNSD is not set # CONFIG_BUSYBOX_CONFIG_ETHER_WAKE is not set # CONFIG_BUSYBOX_CONFIG_FAKEIDENTD is not set diff --git a/sentinel_setup/config/dhcp b/vigilia_setup/config/dhcp similarity index 100% rename from sentinel_setup/config/dhcp rename to vigilia_setup/config/dhcp diff --git a/sentinel_setup/config/firewall.bak b/vigilia_setup/config/firewall.bak similarity index 100% rename from sentinel_setup/config/firewall.bak rename to vigilia_setup/config/firewall.bak diff --git a/sentinel_setup/config/hostapd-psk b/vigilia_setup/config/hostapd-psk similarity index 100% rename from sentinel_setup/config/hostapd-psk rename to vigilia_setup/config/hostapd-psk diff --git a/sentinel_setup/config/network b/vigilia_setup/config/network similarity index 97% rename from sentinel_setup/config/network rename to vigilia_setup/config/network index 3da312e63f..c11a43e1f8 100644 --- a/sentinel_setup/config/network +++ b/vigilia_setup/config/network @@ -19,6 +19,7 @@ config interface 'lan' config interface 'wifi' option type 'bridge' + option ifname 'eth1' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' diff --git a/sentinel_setup/config/wireless b/vigilia_setup/config/wireless similarity index 100% rename from sentinel_setup/config/wireless rename to vigilia_setup/config/wireless diff --git a/sentinel_setup/rc.local b/vigilia_setup/rc.local similarity index 100% rename from sentinel_setup/rc.local rename to vigilia_setup/rc.local diff --git a/sentinel_setup/register/version_1/README b/vigilia_setup/register/version_1/README similarity index 100% rename from sentinel_setup/register/version_1/README rename to vigilia_setup/register/version_1/README diff --git a/sentinel_setup/register/version_1/devices.dat b/vigilia_setup/register/version_1/devices.dat similarity index 100% rename from sentinel_setup/register/version_1/devices.dat rename to vigilia_setup/register/version_1/devices.dat diff --git a/sentinel_setup/register/version_1/register_device.sh b/vigilia_setup/register/version_1/register_device.sh similarity index 100% rename from sentinel_setup/register/version_1/register_device.sh rename to vigilia_setup/register/version_1/register_device.sh diff --git a/sentinel_setup/register/version_2/change_default_pw.sh b/vigilia_setup/register/version_2/change_default_pw.sh similarity index 100% rename from sentinel_setup/register/version_2/change_default_pw.sh rename to vigilia_setup/register/version_2/change_default_pw.sh diff --git a/sentinel_setup/register/version_2/connect_device.sh b/vigilia_setup/register/version_2/connect_device.sh similarity index 100% rename from sentinel_setup/register/version_2/connect_device.sh rename to vigilia_setup/register/version_2/connect_device.sh diff --git a/sentinel_setup/register/version_2/register_device.sh b/vigilia_setup/register/version_2/register_device.sh similarity index 100% rename from sentinel_setup/register/version_2/register_device.sh rename to vigilia_setup/register/version_2/register_device.sh diff --git a/sentinel.config b/vigilia_setup/sentinel.config similarity index 100% rename from sentinel.config rename to vigilia_setup/sentinel.config diff --git a/sentinel_setup/setup/clean b/vigilia_setup/setup/clean.sh similarity index 91% rename from sentinel_setup/setup/clean rename to vigilia_setup/setup/clean.sh index 0c3fb63dfb..01e675edd9 100755 --- a/sentinel_setup/setup/clean +++ b/vigilia_setup/setup/clean.sh @@ -1,3 +1,5 @@ +#!/bin/sh + iptables -t filter -F iptables -t filter -X iptables -t nat -F diff --git a/sentinel_setup/setup/dhcp b/vigilia_setup/setup/dhcp.sh similarity index 65% rename from sentinel_setup/setup/dhcp rename to vigilia_setup/setup/dhcp.sh index 28632484c9..b8122ae992 100755 --- a/sentinel_setup/setup/dhcp +++ b/vigilia_setup/setup/dhcp.sh @@ -1 +1,3 @@ +#!/bin/sh + cat /tmp/dhcp.leases diff --git a/sentinel_setup/setup/nat b/vigilia_setup/setup/nat.sh similarity index 96% rename from sentinel_setup/setup/nat rename to vigilia_setup/setup/nat.sh index dbb6607ce4..ac2a335e3b 100755 --- a/sentinel_setup/setup/nat +++ b/vigilia_setup/setup/nat.sh @@ -1,3 +1,5 @@ +#!/bin/sh + iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT diff --git a/sentinel_setup/setup/restart b/vigilia_setup/setup/restart.sh similarity index 56% rename from sentinel_setup/setup/restart rename to vigilia_setup/setup/restart.sh index 3ce1217c74..b008bb39c5 100755 --- a/sentinel_setup/setup/restart +++ b/vigilia_setup/setup/restart.sh @@ -1 +1,3 @@ +#!/bin/sh + reboot & exit diff --git a/sentinel_setup/setup/show b/vigilia_setup/setup/show.sh similarity index 91% rename from sentinel_setup/setup/show rename to vigilia_setup/setup/show.sh index f1e3ea4802..78697fcb4c 100755 --- a/sentinel_setup/setup/show +++ b/vigilia_setup/setup/show.sh @@ -1,3 +1,5 @@ +#!/bin/sh + #iptables -vL -t filter #iptables -vL -t nat #iptables -vL -t mangle diff --git a/sentinel_setup/setup/startup.sh b/vigilia_setup/setup/startup.sh similarity index 100% rename from sentinel_setup/setup/startup.sh rename to vigilia_setup/setup/startup.sh diff --git a/vigilia_setup/setup/transfer.sh b/vigilia_setup/setup/transfer.sh new file mode 100755 index 0000000000..ef500b64e6 --- /dev/null +++ b/vigilia_setup/setup/transfer.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +scp -r /root/setup rtrimana@128.195.204.132:/home/ +scp -r /etc/config rtrimana@128.195.204.132:/home/ -- 2.34.1