University Crest

[wlug] Firewall script problem

wlug archive index About the wlug list Mailing lists home
To The University of Waikato HomepageWaikato Home > Waikato Mailing Lists > wlug Info > wlug archives
Gun Caundle gun@p...
Mon Apr 26 08:46:11 NZST 2004

Thanx Matt, Mark and Aristotle.
I ran each line of the script from the console and when I got to the
problematic line I got:
Unknown arg '--state'
In 'iptables help' there is no '--state' option.
Here is the section of the script:

# (2) user-defined chain for ACCEPTED TCP packets
iptables -N okay
iptables -A okay -p TCP  --syn -j ACCEPT
iptables -A okay -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A okay -p TCP -j DROP

Is there another command I could instead of  '--state'?  It is used in
further parts of the script as well.

Kind regards
Gun Caundle
GunCom Computing Services
77 Maniapoto St.
ph/fax 07 873 6575
----- Original Message ----- 
From: "Matt Brown" <matt@m...>
To: "Waikato Linux Users Group" <wlug@l...>
Sent: Saturday, April 24, 2004 1:24 PM
Subject: Re: [wlug] Firewall script problem

> Hi Gun,
> On Sat, 2004-04-24 at 12:27, Gun Caundle wrote:
> > Thanx Perry
> > I inserted the '--state' but I still get the same error message; even
when I
> > insert a # at the beginning of the line and run it again!
> > I'm using PICO text editor and saving it with a different name after
> > modifying the script.
> > Any other suggestions
> > Kind regards
> > Gun Caundle
> It sounds like you may have a syntax error or something in your shell
> script, try executing each command in the script directly from a
> console, if they all work that you can focus on looking for syntax
> errors.
> If you are still having problems, perhaps you could put the script on a
> webpage somewhere we could have a look at it. If you can't do that just
> email about 5 lines either side of the problematic statement.
> Regards
> -- 
> Matt Brown
> Email: matt@m...
> GSM  : 021 611 544
> _______________________________________________
> wlug mailing list | wlug@l...
> Unsubscribe:

More information about the wlug mailing list
NOTICE: This is an archive of a public mailing list. The University of Waikato is not responsible for its contents.

The University of Waikato - Te Whare Wananga o Waikato