-
This commit is contained in:
@@ -3,10 +3,14 @@
|
|||||||
|
|
||||||
if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi
|
if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi
|
||||||
|
|
||||||
_owner_id=50000
|
__main() {
|
||||||
_chain="output_netflow_owner_${_owner_id}"
|
:
|
||||||
|
update-alternatives --set iptables /usr/sbin/iptables-legacy 2>/dev/null
|
||||||
|
|
||||||
for cmd in iptables ip6tables; do
|
_owner_id=50000
|
||||||
|
_chain="output_netflow_owner_${_owner_id}"
|
||||||
|
|
||||||
|
for cmd in iptables ip6tables; do
|
||||||
$cmd -t mangle -N "$_chain" 2>/dev/null || true
|
$cmd -t mangle -N "$_chain" 2>/dev/null || true
|
||||||
|
|
||||||
if ! $cmd -t mangle -C OUTPUT -m owner --gid-owner "$_owner_id" -j "$_chain" 2>/dev/null; then
|
if ! $cmd -t mangle -C OUTPUT -m owner --gid-owner "$_owner_id" -j "$_chain" 2>/dev/null; then
|
||||||
@@ -16,7 +20,12 @@ for cmd in iptables ip6tables; do
|
|||||||
if ! $cmd -t mangle -C "$_chain" -j RETURN 2>/dev/null; then
|
if ! $cmd -t mangle -C "$_chain" -j RETURN 2>/dev/null; then
|
||||||
$cmd -t mangle -A "$_chain" -j RETURN
|
$cmd -t mangle -A "$_chain" -j RETURN
|
||||||
fi
|
fi
|
||||||
done
|
$cmd -t mangle -L OUTPUT -v -n -x
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
__main
|
||||||
|
|
||||||
__help() {
|
__help() {
|
||||||
cat >/dev/null <<-'EOF'
|
cat >/dev/null <<-'EOF'
|
||||||
|
|||||||
Reference in New Issue
Block a user