Dan Widyono on 20 Apr 2005 16:46:24 -0000

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] iptables

On Wed, Apr 20, 2005 at 10:51:41AM -0400, Jeff Abrahamson wrote:
> I have an iptables script that's giving me trouble.  I'm hoping
> someone here can point me in the right direction.  I've attached the
> script for general feedback, but here are the two (current) problems:
> 1. I tried to say
>      $IPTABLES -A INPUT -p udp,tcp --dport 123 -src $source -j ACCEPT
>    but was obliged to change that to this to be understood:
>      $IPTABLES -A INPUT -p udp --dport 123 -src $source -j ACCEPT
>      $IPTABLES -A INPUT -p tcp --dport 123 -src $source -j ACCEPT
>    And then I still get errors:
>        + /sbin/iptables -A INPUT -p udp --dport 123 -src admin.math.drexel.edu -j ACCEPT^M
>      Bad argument `admin.math.drexel.edu'^M
>      Try `iptables -h' or 'iptables --help' for more information.^M

I don't recall -src.  $IPTABLES -A INPUT -s $source -p udp etc...

If -src is indeed valid, then you might need -m udp as well before that.

Dan W.
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug