• iptables syntax issue

    From Mike Scott@2:250/1 to All on Tuesday, November 26, 2024 13:32:42
    Hi all. I'm trying to get to grips with iptables, but I'm flummoxed by this:

    iptables> sudo iptables --table nat -D PREROUTING -p tcp --source \!192.168.0.0/24 --dport ssh -j REDIRECT --to-port 20022
    iptables v1.8.7 (nf_tables): host/network `!192.168.0.0' not found
    Try `iptables -h' or 'iptables --help' for more information.


    So what is the syntax to make a rule match sources other than the given please?


    Thanks.

    --
    Mike Scott
    Harlow, England

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From Mike Scott@2:250/1 to All on Tuesday, November 26, 2024 13:44:58
    On 26/11/2024 13:32, Mike Scott wrote:
    Hi all. I'm trying to get to grips with iptables, but I'm flummoxed by
    this:

    iptables> sudo iptables --table nat -D PREROUTING -p tcp --source \!192.168.0.0/24 --dport ssh -j REDIRECT --to-port 20022
    iptables v1.8.7 (nf_tables): host/network `!192.168.0.0' not found
    Try `iptables -h' or 'iptables --help' for more information.


    So what is the syntax to make a rule match sources other than the given please?


    Thanks.


    Grrr. The online man page (https://linux.die.net/man/8/iptables) I was
    looking at is wrong. It should be ! -s <address> not -s !<address>

    Not good.

    --
    Mike Scott
    Harlow, England


    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From Marc Haber@2:250/1 to All on Tuesday, November 26, 2024 20:24:40
    Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
    Hi all. I'm trying to get to grips with iptables, but I'm flummoxed by this:

    iptables> sudo iptables --table nat -D PREROUTING -p tcp --source >\!192.168.0.0/24 --dport ssh -j REDIRECT --to-port 20022
    iptables v1.8.7 (nf_tables): host/network `!192.168.0.0' not found
    Try `iptables -h' or 'iptables --help' for more information.


    So what is the syntax to make a rule match sources other than the given >please?

    I haven't used iptables directly in ages. Did you try putting
    whitespace between the ! and the network?

    Greetings
    Marc
    -- ---------------------------------------------------------------------------- Marc Haber | " Questions are the | Mailadresse im Header Rhein-Neckar, DE | Beginning of Wisdom " |
    Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 6224 1600402

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: private site, see http://www.zugschlus.de/ for det (2:250/1@fidonet)
  • From Mike Scott@2:250/1 to All on Thursday, November 28, 2024 08:03:11
    On 26/11/2024 20:24, Marc Haber wrote:
    Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:
    Hi all. I'm trying to get to grips with iptables, but I'm flummoxed by this: >>
    iptables> sudo iptables --table nat -D PREROUTING -p tcp --source
    \!192.168.0.0/24 --dport ssh -j REDIRECT --to-port 20022
    iptables v1.8.7 (nf_tables): host/network `!192.168.0.0' not found
    Try `iptables -h' or 'iptables --help' for more information.


    So what is the syntax to make a rule match sources other than the given
    please?

    I haven't used iptables directly in ages. Did you try putting
    whitespace between the ! and the network?

    Greetings
    Marc


    Thanks for the reply.

    I found the man page I looked at was wrong. The syntax is /not/
    -s ! <address>, rather ! -s <address>.



    --
    Mike Scott
    Harlow, England


    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From candycanearter07@2:250/1 to All on Saturday, November 30, 2024 06:20:07
    Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote at 13:44 this Tuesday (GMT):
    On 26/11/2024 13:32, Mike Scott wrote:
    Hi all. I'm trying to get to grips with iptables, but I'm flummoxed by
    this:

    iptables> sudo iptables --table nat -D PREROUTING -p tcp --source
    \!192.168.0.0/24 --dport ssh -j REDIRECT --to-port 20022
    iptables v1.8.7 (nf_tables): host/network `!192.168.0.0' not found
    Try `iptables -h' or 'iptables --help' for more information.


    So what is the syntax to make a rule match sources other than the given
    please?


    Thanks.


    Grrr. The online man page (https://linux.die.net/man/8/iptables) I was looking at is wrong. It should be ! -s <address> not -s !<address>

    Not good.


    Try emailing the webmaster?
    --
    user <candycane> is generated from /dev/urandom

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: the-candyden-of-code (2:250/1@fidonet)
  • From Mike Scott@2:250/1 to All on Tuesday, December 03, 2024 19:19:43
    On 30/11/2024 06:20, candycanearter07 wrote:

    Try emailing the webmaster?


    Done, but as they don't give contact info on their pages I assume
    they're not welcoming input.


    --
    Mike Scott
    Harlow, England


    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From Mike Scott@2:250/1 to All on Monday, December 09, 2024 11:50:03
    On 03/12/2024 19:19, Mike Scott wrote:
    On 30/11/2024 06:20, candycanearter07 wrote:

    Try emailing the webmaster?


    Done, but as they don't give contact info on their pages I assume
    they're not welcoming input.



    And the email to webmaster@... has just bounced (Operation timed out).
    They really don't seem to want people to talk to them.

    --
    Mike Scott
    Harlow, England


    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: Scott family (2:250/1@fidonet)
  • From George Neuner@2:250/1 to All on Tuesday, December 10, 2024 01:24:54
    On Mon, 9 Dec 2024 11:50:03 +0000, Mike Scott <usenet.16@scottsonline.org.uk.invalid> wrote:

    On 03/12/2024 19:19, Mike Scott wrote:
    On 30/11/2024 06:20, candycanearter07 wrote:

    Try emailing the webmaster?


    Done, but as they don't give contact info on their pages I assume
    they're not welcoming input.



    And the email to webmaster@... has just bounced (Operation timed out).
    They really don't seem to want people to talk to them.

    The maintainer's address is web at die dot net
    It's right on the main page.

    --- MBSE BBS v1.1.0 (Linux-x86_64)
    * Origin: i2pn2 (i2pn.org) (2:250/1@fidonet)