Commit 459afc93 by Heiko Kokemoor

Kleine Verbesserungen

1 parent 6cf3dd2e
Showing with 11 additions and 5 deletions
...@@ -31,7 +31,7 @@ check_rule_start() ...@@ -31,7 +31,7 @@ check_rule_start()
{ {
CLIENT_IP=$(echo $SSH_CLIENT | awk '{ print $1}') CLIENT_IP=$(echo $SSH_CLIENT | awk '{ print $1}')
$IPTABLES -L|grep "tcp dpt:$PROXPORT" $IPTABLES -L -n|grep "tcp dpt:$PROXPORT"|grep $CLIENT_IP
} }
accept_proxmox() accept_proxmox()
...@@ -86,11 +86,14 @@ i=$1 ...@@ -86,11 +86,14 @@ i=$1
case $i in case $i in
start) start)
# check_rule_start check_rule_start
# if [ $? = 1 ] if [ $? = 1 ]
# then then
accept_proxmox accept_proxmox
# fi else
echo "IP $CLIENT_IP already unblocked"
fi
;; ;;
stop) stop)
...@@ -99,6 +102,9 @@ case $i in ...@@ -99,6 +102,9 @@ case $i in
stop-all) stop-all)
stop_all stop_all
;; ;;
check)
check_rule_start
;;
*) *)
echo $(basename $0) '[start|stop|stop-all] - opens a port for the Proxmox Webinterface' echo $(basename $0) '[start|stop|stop-all] - opens a port for the Proxmox Webinterface'
;; ;;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!