Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncBash
/
mcBash
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6cf3dd2e
authored
Feb 17, 2014
by
Heiko Kokemoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prox-fire braucht die Error Codes (Return Codes) von iptables. Sorry, sieht scheiße aus
1 parent
e591985d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
prox-fire.d/prox-fire
prox-fire.d/prox-fire
View file @
6cf3dd2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment