Re: [SLUG] iptables

From: Paul M Foster (paulf@quillandmouse.com)
Date: Tue May 03 2005 - 23:49:16 EDT


On Tue, May 03, 2005 at 09:40:05PM -0500, Glenn Meyer wrote:

> I don't know why I can't use that either. It looks like it should work,
> but here's the error I get....
>
> root@m700l:~# iptables -A INPUT -s 192.168.10.0/24 --dport 22 -j ACCEPT
> iptables v1.2.11: Unknown arg `--dport'
> Try `iptables -h' or 'iptables --help' for more information.
>
> Then I tried spelling it differently (with an "s" on the end - like in
> the man pages - I could have sworn it used to not have an "s" on --dport)
>
> root@m700l:~# iptables -A INPUT -s 192.168.10.0/24 --dports 22 -j ACCEPT
> iptables v1.2.11: Unknown arg `--dports'
> Try `iptables -h' or 'iptables --help' for more information.
> root@m700l:~#
>

>From a closer reading of the man page, I suspect you must add the -p
parameter as well. You can specify it as -p tcp or -p all. It looks like
doing so loads a module that then allows iptables to understand the
--dport parameter. Try it and see.

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:37:24 EDT