TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:5678] ipchains script

I think your problem is related to order. ipchains depends on order. If
your first line is deny everything and next one is to accept port 21 --
port 21 will be blocked because the first line (deny) applies to it and
that's it. Therefore what you want to do is put in all your accept lines
first, then a blanket deny script. The reason my script doesn't block 5555
is because the blanket deny line is only for ports from 1-1023. Copy that
line and add 5555 (or whatever range) and it should work. Be careful what
you deny though, I found that some ports over 1023 are needed for client

Hope this helps,


> Hash: SHA1
> Sometime around the 29th of April in 1999, a certain Ben Luey said:
> : Here is my ipchains script. It allows smtp and web from anywhere. telnet
> : and ftp from trusted hosts, ssh from anywhere, but #ed out.
> :
> : To connect to an ssh server via ssh (version 1) you need port 1023 open.
> Okay, I just can't get these damned ipchains to work. I can
> setup all my rules, it all looks fine, a visual path-following
> seems correct, and using the packet-checking option (-C) says
> it's working fine ..
> .. but if i've got the default input policy set to DENY, none of
> my packets get through (even for rules specified to accept),
> and if I've got it set to ACCEPT, any packet can get through,
> even if it's specified as DENY.
> I'm pissed.
> I'm not going to post my rc.ipchains script until I've got it
> working (it's fugly, and about 9k), or unless someone requests
> it.
> I even tried using your script, Ben (just modified the hosts),
> and it doesn't block a 'telnet <my ip> 5555', for example, even
> though 5555 has no rule (thus defaulting to the last DENY
> rule).
> - --
> [----------------------------------------------------------------------]
> | Joshua Becker                    - aka -                      JellyD |
> | email:                          IRC: EFnet, DALnet |
> [----------------------------------------------------------------------]
> Version: GNUPG v0.4.3 (GNU/Linux)
> Comment: For info finger
> =Msl3
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> Try our website:

Ben Luey
ICQ: 19144397

This is a Bart Simpson Congress: underachievers and proud of it.  
   --   Richard Gephardt