• iptables syntax issue

    From Mike Scott@usenet.16@scottsonline.org.uk.invalid to comp.os.linux.networking on Tue Nov 26 13:32:42 2024
    From Newsgroup: comp.os.linux.networking

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Scott@usenet.16@scottsonline.org.uk.invalid to comp.os.linux.networking on Tue Nov 26 13:44:58 2024
    From Newsgroup: comp.os.linux.networking

    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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Marc Haber@mh+usenetspam1118@zugschl.us to comp.os.linux.networking on Tue Nov 26 21:24:40 2024
    From Newsgroup: comp.os.linux.networking

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Scott@usenet.16@scottsonline.org.uk.invalid to comp.os.linux.networking on Thu Nov 28 08:03:11 2024
    From Newsgroup: comp.os.linux.networking

    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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From candycanearter07@candycanearter07@candycanearter07.nomail.afraid to comp.os.linux.networking on Sat Nov 30 06:20:07 2024
    From Newsgroup: comp.os.linux.networking

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Scott@usenet.16@scottsonline.org.uk.invalid to comp.os.linux.networking on Tue Dec 3 19:19:43 2024
    From Newsgroup: comp.os.linux.networking

    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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Scott@usenet.16@scottsonline.org.uk.invalid to comp.os.linux.networking on Mon Dec 9 11:50:03 2024
    From Newsgroup: comp.os.linux.networking

    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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From George Neuner@gneuner2@comcast.net to comp.os.linux.networking on Mon Dec 9 20:24:54 2024
    From Newsgroup: comp.os.linux.networking

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114