Skip to content

Commit

Permalink
Update openWRT_install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberAndi authored Sep 2, 2023
1 parent 568aecf commit add2be7
Showing 1 changed file with 44 additions and 13 deletions.
57 changes: 44 additions & 13 deletions openWRT_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ revision=${revision::-1}
release=${release::-1}
revision=${revision:1}
release=${release:1}
echo 'Current Version ' $release, $revision
echo
echo '----------------------------------------------------------------'
echo ' Current Version ' $release, $revision
echo '----------------------------------------------------------------'
echo

#Localaddresen
LOCALADDRESS="127.192.0.1/10"
Expand All @@ -79,8 +83,7 @@ actWlan=$(ifconfig | grep '^w\w*' -m 1 | cut -f1 -d ' ')
INET_GW=$(ip route | grep default | cut -f3 -d ' ')
INET_GW_org=$INET_GW

echo 'Please give me the WAN-IP (Gateway/Router): ('$INET_GW')'
read INET_GW
read -p 'Please give me the WAN-IP (Gateway/Router): ('$INET_GW')' INET_GW
echo
if [ "$INET_GW" = "" ]
then
Expand Down Expand Up @@ -123,17 +126,17 @@ ACCESS_SERVER=$(echo $($(echo ip addr show dev $(echo $actEth | cut -f1 -d' '))
LAN=$(echo $($(echo ip addr show dev $(echo $actEth | cut -f1 -d' ')) | grep inet | cut -f6 -d ' ' ) | cut -f1 -d ' ' | cut -f1 -d'/' )
LAN_org=$LAN

echo 'Type the LAN-IP (Internal Network): ('$LAN')'
read LAN
#echo 'Type the LAN-IP (Internal Network): ('$LAN')'
read -p 'Type the LAN-IP (Internal Network): ('$LAN')' LAN
if [ "$LAN" = "" ]
then
LAN=$LAN_org
fi

LOCAL_DOMAIN='CyberSecBox.local'
echo
echo 'Your local Domain of your LAN? (CyberSecBox.local)'
read LOCAL_DOMAIN
#echo 'Your local Domain of your LAN? (CyberSecBox.local)'
read -p 'Your local Domain of your LAN? (CyberSecBox.local)' LOCAL_DOMAIN
if [ "$LOCAL_DOMAIN" = "" ]
then
LOCAL_DOMAIN='CyberSecBox.local'
Expand All @@ -142,8 +145,8 @@ fi
WIFI_SSID='CyberSecBox'
WIFI_SSID_org=$WIFI_SSID
echo
echo 'The Main-WiFi-SSID? ('$WIFI_SSID')'
read WIFI_SSID
#echo 'The Main-WiFi-SSID? ('$WIFI_SSID')'
read -p 'The Main-WiFi-SSID? ('$WIFI_SSID')' WIFI_SSID
if [ "$WIFI_SSID" = "" ]
then
WIFI_SSID=$WIFI_SSID_org
Expand All @@ -153,17 +156,15 @@ fi
WIFI_PASS='Cyber,Sec9ox'
WIFI_PASS_org=$WIFI_PASS
echo
echo 'And the WiFi-Key? (Cyber,Sec9ox)'
read WIFI_PASS
read -p 'And the WiFi-Key? (Cyber,Sec9ox)' WIFI_PASS
if [ "$WIFI_PASS" = "" ]
then
WIFI_PASS=$WIFI_PASS_org
fi

USERNAME='root'
echo
echo 'Enter the user for the login: (default: root)'
read -s USERNAME
read -p 'Enter the user for the login: (default: root)' -s USERNAME
passwd $USERNAME

SUBNET=$(echo $LAN | cut -f3 -d '.')
Expand All @@ -185,6 +186,35 @@ if [ $SUBNET_sep -lt 125 ]

fi

DNS_PORT='y'
echo
read -p 'DNS-Relay to UNBOUND-DNS? (Y/n) ' -s -n 1 DNS_PORT
if [ "$DNS_PORT" = "" ]
then
DNS_Relay_port="5353"
elif [ "$DNS_PORT" = "y" ]
then
DNS_Relay_port="5353"
else
DNS_Relay_port="9053"
fi


SECURE_RULES='y'

echo
read -p 'Activate HighSecure-Firewall? (Y/n) ' -s -n 1 SECURE_RULES

if [ "$SECURE_RULES" = "" ]
then
FW_HSactive="1"
elif [ "$SECURE_RULES" = "y" ]
then
FW_HSactive="1"
else
FW_HSactive="0"
fi

SERVER_range='192.168.'$(($SUBNET_sep - 123))'.2,192.168.'$(($SUBNET_sep - 123))'.200,24h'
CONTROL_range='192.168.'$(($SUBNET_sep - 119))'.2,192.168.'$(($SUBNET_sep - 119))'.200,24h'
HCONTROL_range='192.168.'$(($SUBNET_sep - 118))'.2,192.168.'$(($SUBNET_sep - 118))'.200,24h'
Expand Down Expand Up @@ -251,6 +281,7 @@ ENTERTAIN_ssid='Entertain-'$WIFI_SSID
GUEST_ssid='Guest-'$WIFI_SSID
CMOVIE_ssid='Free_CMovie_Portal'
Adversisment_ssid='Telekom'

}

install_update() {
Expand Down

0 comments on commit add2be7

Please sign in to comment.