From: Alexis <flexibeast@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Strange behaviour of iptables
Date: Thu, 02 Jan 2025 20:33:22 +1100 [thread overview]
Message-ID: <87ldvtef19.fsf@gmail.com> (raw)
In-Reply-To: <58bbb33e-8a76-9634-0ceb-dd2520d9cd13@hanft.de> (Matthias Hanft's message of "Thu, 2 Jan 2025 09:13:08 +0100")
Matthias Hanft <mh@hanft.de> 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.
next prev parent reply other threads:[~2025-01-02 9:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-01 17:33 [gentoo-user] Strange behaviour of iptables Matthias Hanft
2025-01-02 4:34 ` Matt Connell
2025-01-02 8:13 ` Matthias Hanft
2025-01-02 9:33 ` Alexis [this message]
2025-01-03 10:30 ` Matthias Hanft
2025-01-02 19:25 ` Matt Connell
2025-01-02 23:00 ` Ro Bra
2025-01-02 23:03 ` Ro Bra
2025-01-03 1:15 ` Matt Connell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ldvtef19.fsf@gmail.com \
--to=flexibeast@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox