Commit 6cf3dd2e by Heiko Kokemoor

prox-fire braucht die Error Codes (Return Codes) von iptables. Sorry, sieht scheiße aus

1 parent e591985d
Showing with 4 additions and 4 deletions
......@@ -50,9 +50,9 @@ drop_proxmox()
EO=0
while [ $EI = 0 ] && [ $EO = 0 ]
do
$IPTABLES -D INPUT -i $EXT_IFACE -p tcp --dport $PROXPORT -s $CLIENT_IP -j ACCEPT 2&>/dev/null
$IPTABLES -D INPUT -i $EXT_IFACE -p tcp --dport $PROXPORT -s $CLIENT_IP -j ACCEPT
EI=$?
$IPTABLES -D OUTPUT -o $EXT_IFACE -p tcp --dport $PROXPORT -d $CLIENT_IP -j ACCEPT 2&>/dev/null
$IPTABLES -D OUTPUT -o $EXT_IFACE -p tcp --dport $PROXPORT -d $CLIENT_IP -j ACCEPT
EO=$?
done
echo "Port $PROXPORT for IP $CLIENT_IP is blocked"
......@@ -72,8 +72,8 @@ stop_all()
do
L=$(( $L+1 ))
Z[$L]=$(echo $A|awk '{ print $'''$L'''}')
$IPTABLES -D INPUT -i $EXT_IFACE -p tcp --dport $PROXPORT -s ${Z[$L]} -j ACCEPT 2&>/dev/null
$IPTABLES -D OUTPUT -o $EXT_IFACE -p tcp --dport $PROXPORT -d ${Z[$L]} -j ACCEPT 2&>/dev/null
$IPTABLES -D INPUT -i $EXT_IFACE -p tcp --dport $PROXPORT -s ${Z[$L]} -j ACCEPT
$IPTABLES -D OUTPUT -o $EXT_IFACE -p tcp --dport $PROXPORT -d ${Z[$L]} -j ACCEPT
if [ -z ${Z[$L]} ]
then C=1
fi
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!