Line 95... |
Line 95... |
95 |
IP_FROM=${IP_FROM:="0.0.0.0"}
|
95 |
IP_FROM=${IP_FROM:="0.0.0.0"}
|
96 |
$SED "s ^SSH_ADMIN_FROM=.* SSH_ADMIN_FROM=$LAN_IP/$IP_FROM g" $ALCASAR_CONF
|
96 |
$SED "s ^SSH_ADMIN_FROM=.* SSH_ADMIN_FROM=$LAN_IP/$IP_FROM g" $ALCASAR_CONF
|
97 |
# Setting SSH port in Alcasar configuration
|
97 |
# Setting SSH port in Alcasar configuration
|
98 |
SSH_PORT=${SSH_PORT:=22}
|
98 |
SSH_PORT=${SSH_PORT:=22}
|
99 |
$SED "s/^SSH_WAN=.*/SSH_WAN=$SSH_PORT/g" $ALCASAR_CONF
|
99 |
$SED "s/^SSH_WAN=.*/SSH_WAN=$SSH_PORT/g" $ALCASAR_CONF
|
100 |
LAN_PORT =`$GREP "^SSH_LAN=" $ALCASAR_CONF | cut -d"=" -f2`
|
100 |
LAN_PORT=`$GREP "^SSH_LAN=" $ALCASAR_CONF | cut -d"=" -f2`
|
101 |
LAN_PORT=${LAN_PORT:=0}
|
101 |
LAN_PORT=${LAN_PORT:=0}
|
102 |
# Checking if there is already a port other than the LAN port set
|
102 |
# Checking if there is already a port other than the LAN port set
|
103 |
if [ `grep -E "^.*Port\s[0-9]*" /etc/ssh/sshd_config| grep -vEc "\s$LAN_PORT$"` -gt 0 ]
|
103 |
if [ `grep -E "^.*Port\s[0-9]*" /etc/ssh/sshd_config| grep -vEc "\s$LAN_PORT$"` -gt 0 ]
|
104 |
then
|
104 |
then
|
105 |
if [ $SSH_PORT -ne $LAN_PORT ]
|
105 |
if [ $SSH_PORT -ne $LAN_PORT ]
|
Line 129... |
Line 129... |
129 |
# Editing Alcasar configuration
|
129 |
# Editing Alcasar configuration
|
130 |
$SED "s/^SSH_LAN=.*/SSH_LAN=$SSH_PORT/g" $ALCASAR_CONF
|
130 |
$SED "s/^SSH_LAN=.*/SSH_LAN=$SSH_PORT/g" $ALCASAR_CONF
|
131 |
# Setting SSH port in Alcasar configuration
|
131 |
# Setting SSH port in Alcasar configuration
|
132 |
SSH_PORT=${SSH_PORT:=22}
|
132 |
SSH_PORT=${SSH_PORT:=22}
|
133 |
$SED "s/^SSH_LAN=.*/SSH_LAN=$SSH_PORT/g" $ALCASAR_CONF
|
133 |
$SED "s/^SSH_LAN=.*/SSH_LAN=$SSH_PORT/g" $ALCASAR_CONF
|
134 |
WAN_PORT =`$GREP "^SSH_WAN=" $ALCASAR_CONF | cut -d"=" -f2`
|
134 |
WAN_PORT=`$GREP "^SSH_WAN=" $ALCASAR_CONF | cut -d"=" -f2`
|
135 |
WAN_PORT=${WAN_PORT:=0}
|
135 |
WAN_PORT=${WAN_PORT:=0}
|
136 |
# Checking if there is already a port other than the WAN port set
|
136 |
# Checking if there is already a port other than the WAN port set
|
137 |
if [ `grep -E "^.*Port\s[0-9]*" /etc/ssh/sshd_config| grep -vEc "\s$WAN_PORT$"` -gt 0 ]
|
137 |
if [ `grep -E "^.*Port\s[0-9]*" /etc/ssh/sshd_config| grep -vEc "\s$WAN_PORT$"` -gt 0 ]
|
138 |
then
|
138 |
then
|
139 |
if [ $SSH_PORT -ne $WAN_PORT ]
|
139 |
if [ $SSH_PORT -ne $WAN_PORT ]
|