Search This Blog

Thursday, October 25, 2007

Re: Default Policy = DROP. Help-me

On 2007-10-25 Paolo wrote:
> On Thu, Oct 25, 2007 at 02:10:43PM +0200, Ansgar -59cobalt- Wiechers wrote:
>>> $iptables -t mangle -P POSTROUTING ACCEPT &&\
>>> echo "Policing .......................................... [ OK ]" || {
>>> echo "Something broke in 'Policing'!"
>>> exit 1
>>> }
>>
>> You don't want to do that, because the term in curled braces is
>> executed when *any* of the previous commands fails (including the
>> echo). Better use something like this:
>
> well, if 'echo' fails, you're really in troubles and need to fix
> something else before running the fw.

True. However, that doesn't change anything at all about the (false)
assumptions the construct is based upon. I presented a better approach
and susggest to use that one instead.

Regards
Ansgar Wiechers
--
"The Mac OS X kernel should never panic because, when it does, it
seriously inconveniences the user."
--http://developer.apple.com/technotes/tn2004/tn2118.html


--
To UNSUBSCRIBE, email to debian-firewall-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

No comments: