From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8FF7315812D for ; Thu, 02 Jan 2025 09:33:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E3C58E0819; Thu, 02 Jan 2025 09:33:27 +0000 (UTC) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5449DE07D3 for ; Thu, 02 Jan 2025 09:33:27 +0000 (UTC) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2163dc5155fso148863055ad.0 for ; Thu, 02 Jan 2025 01:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735810405; x=1736415205; darn=lists.gentoo.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=aYLmQNyAMBDmbVJ+FI63ugLi+W/Frg/uneWCpctq0Dw=; b=Dd4eDyKbA7pdcDfb3PkNqGfrUZ6p9tpL9J1HwHLgxqOHXb0gqZ5ML0BgViNsvqLmSO Tr4V6ppKFYGjPi7sPxLP3BI9P8273wxuyVoqJX5H6upkB8v91avJ3N8mWV0njoHxs9dn LwRaGFBf/0h171efLGBYC26R8iLJ7LEk9aGlPzWC6V6tse6iiB7HXBTA/vRCyH7GfA9D 9diy4oRQJZElMg9ByVx6LZQ/f0ywQYjoFl9h3roRlUvv8gUSm8WH9WuYjNWB/QAmj/f4 rj9BIIlFFzHIkYPuknJAJ5GLIu6opnln6NYrcsuDuQLoDGyJkMfsRgC4zlksjy6CFlv1 DDlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735810405; x=1736415205; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aYLmQNyAMBDmbVJ+FI63ugLi+W/Frg/uneWCpctq0Dw=; b=wRtkvnUhMPwiLcjMzsEqkPGReEFjsrMPQWCa85Y1sp8XyJc0DiDx7s2c1Wfn3wa0dP TO/kwMuzv3UExDj5ahcFnzBTMYSa5ofkGMl80rnaDk5YvI1/pY5GYie/7ongEmIE0zK3 /kYCaBMXFeRgo3Q0FRQsIhRxTvFPc7yhmvVKClzZXZQD5eyzB/4ISM3U1gbHNhcctZ+M zQzjBKUEcqrR4kBJnzrH8GR6JfnqK4LWPhHHObKW8DHce7duOlK6mzkWbWR4jtB0+J9N Fi+s4BtkacJehI7pqMAipmTrYU4EOWMmslBE3TPoeLIBqhQQw/W2SJJY15v+srUX3g3Z 4e8A== X-Gm-Message-State: AOJu0YyIg2uLUSRYNO3djlp5XtX+mPs7Gpi3mr8/Zjy+2OFmDi4XZlwa 0SH6vIeDE5PeclbGNEjvqpOyBCNuM1hp7nx45JPi0Jy07kgvf0OvtibGoA== X-Gm-Gg: ASbGncv+8StWx712Aq2zVJOpHCk1wqjmaEkPYV8a7uVdbWZN3l+DRYiEOkBnZy7pUjJ rvyEUtf7Bgj/apXm7Ep7y3gQy2XXqVlQBnCoSnpTO+Xo/wc8uB3F7/ddmwa3Rf7QeHQMk08PT8l RiUGvAev7JWrcviB6v8Am5DFZaUn0TdQS2QLFv2yjAZ1g4f5pQ9tvVZQIVnoU7QKtv3ZfwsOdLp ImgxhcphuJI9Vr+ywY13e8nhXz99QJ3UuuYIJZu7S1N7DKpGzbz7SY= X-Google-Smtp-Source: AGHT+IF2wa/KtczSUjrpqlFFQCpD5szu79tywSZpej+qGMeelkxNLxpoW4stmspVGrSUh3isUvsnCw== X-Received: by 2002:a17:902:d48a:b0:215:b8b6:d2ea with SMTP id d9443c01a7336-219e6ea1cc6mr579244885ad.15.1735810405612; Thu, 02 Jan 2025 01:33:25 -0800 (PST) Received: from localhost ([144.132.237.71]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc970520sm224586075ad.75.2025.01.02.01.33.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jan 2025 01:33:25 -0800 (PST) From: Alexis To: gentoo-user@lists.gentoo.org Cc: Subject: Re: [gentoo-user] Strange behaviour of iptables In-Reply-To: <58bbb33e-8a76-9634-0ceb-dd2520d9cd13@hanft.de> (Matthias Hanft's message of "Thu, 2 Jan 2025 09:13:08 +0100") References: <673fdadaaa7de7e12ac8d0f4c3443b18c0751ecc.camel@connell.tech> <58bbb33e-8a76-9634-0ceb-dd2520d9cd13@hanft.de> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 02 Jan 2025 20:33:22 +1100 Message-ID: <87ldvtef19.fsf@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Archives-Salt: 21d62fa3-3c8f-428f-a856-32b3013e9a7b X-Archives-Hash: 803c56d5f42b3983ee25edabec19c8a0 Matthias Hanft writes: > Yes, everything is run as root. Indeed I had /sbin/iptables in > my PHP > script. > Getting this error, I tried "which iptables" in a root bash > which > showed > /usr/bin/iptables. So I changed this (and even to > "/usr/bin/iptables-legacy", > but with no effect, presumably because of... > > n ~ # ls -l /sbin/iptables > lrwxrwxrwx 1 root root 20 Apr 18 2024 /sbin/iptables -> > xtables-legacy-multi > n ~ # ls -l /usr/bin/iptables > lrwxrwxrwx 1 root root 20 Apr 18 2024 /usr/bin/iptables -> > xtables-legacy-multi > n ~ # ls -l /usr/bin/iptables-legacy > lrwxrwxrwx 1 root root 20 Dec 21 09:30 /usr/bin/iptables-legacy > -> > xtables-legacy-multi > > So everything seems to call "xtables-legacy-multi" anyway. Running `xtables-legacy-multi` without any arguments produces output stating that it requires a subcommand, e.g. `xtables-legacy-multi iptables-legacy`. Running _that_ results in: ``` iptables v1.8.11 (legacy): no command specified Try `iptables -h' or 'iptables --help' for more information. ``` So what happens if you instead do: ``` exec("/usr/bin/xtables-legacy-multi iptables-legacy -L COUNT -n -v -x -w", $iptables); ``` ? Alexis.