-
This commit is contained in:
@@ -6,15 +6,16 @@ if [[ -d "/host/proc/1/" ]]; then source /apps/gitrce/hook/singleton.sh "$0"; fi
|
||||
__main() {
|
||||
:
|
||||
update-alternatives --set iptables /usr/sbin/iptables-legacy 2>/dev/null
|
||||
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy 2>/dev/null
|
||||
|
||||
_owner_id=50000
|
||||
_owner_id=51000
|
||||
_chain="output_netflow_owner_${_owner_id}"
|
||||
|
||||
for cmd in iptables ip6tables; do
|
||||
$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
|
||||
$cmd -t mangle -A OUTPUT -m owner --gid-owner "$_owner_id" -j "$_chain"
|
||||
if ! $cmd -t mangle -C OUTPUT -m mark ! --mark 0x0 -j "$_chain" 2>/dev/null; then
|
||||
$cmd -t mangle -A OUTPUT -m mark ! --mark 0x0 -j "$_chain"
|
||||
fi
|
||||
|
||||
if ! $cmd -t mangle -C "$_chain" -j RETURN 2>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user