Path: csiph.com!weretis.net!feeder8.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!.POSTED.torres.zugschlus.de!not-for-mail From: Marc Haber Newsgroups: comp.os.linux.networking Subject: Re: iptables syntax issue Date: Tue, 26 Nov 2024 21:24:40 +0100 Organization: private site, see http://www.zugschlus.de/ for details Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Tue, 26 Nov 2024 20:24:41 -0000 (UTC) Injection-Info: news1.tnib.de; posting-host="torres.zugschlus.de:81.169.166.32"; logging-data="3967446"; mail-complaints-to="abuse@tnib.de" X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.os.linux.networking:8518 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? 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