[Shorewall-users] STDERR messages

Gar Nelson gar.nelson@noaa.gov
Fri, 05 Apr 2002 14:30:10 -0700


This is a multi-part message in MIME format.
--------------FC3BB18DD90CCDB2B5DE3FAF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I already deleted the earlier message, but it got me thinking anyway.
The question was about all the iptables messaages that get output to the
main console terminal. Tom said something like 'just redirect STDERR'.

Okay. Looking at Marcel Gagne's Linux Sys Admin book, he talks about
STDERR on page 54 with the illustration;

	command-name 2>&1 > logfile.out

Next I looked at /etc/rc/d/init.d/shorewall and found  

################################################################################
# Run iptables and if an error occurs, stop the firewall and
quit              #
################################################################################
run_iptables() {
    if ! iptables `echo $@ | sed 's/!/! /g'`; then
        [ -z "$stopping" ] && { stop_firewall; exit 2; }
    fi
}

And I found lots of stuff that refered back to run_iptables(), but I
don't quite see how to apply "iptables 2>&1 > /var/log/iptables.log" to
that mess up there. 

And though Mastering Regular Expressions by Jeff Friedl, O'Reilly, Jan
97 is on my Amazon wishlist, I haven't picked it up yet. Perhaps my
assumption is incorrect that that procedure would look legible if I had
a better handle on regular expressions?

For me, its not a big deal to have all that STDERR stuff go out to the
screen, since the box is in an equipment room, normally without a screen
attached. It would be better though to have enough understanding of how
shorewall is operating with iptables to apply Tom's comment to the box.
I'm working on getting there, but I'm not there yet.

Oh, and I wrote this without reading through the FAQ again, but I'll
head off there next.

Best Regards,
Gar
--------------FC3BB18DD90CCDB2B5DE3FAF
Content-Type: text/x-vcard; charset=us-ascii;
 name="gar.nelson.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gar Nelson
Content-Disposition: attachment;
 filename="gar.nelson.vcf"

begin:vcard 
n:Nelson;Gar
tel;cell:n/a
tel;fax:406-228-9627
tel;work:406-228-2850
x-mozilla-html:FALSE
org:WSO Glasgow;Electronics
version:2.1
email;internet:gar.nelson@noaa.gov
title:Electronic Technician
adr;quoted-printable:;;NWS Office Glasgow=0D=0A101 Airport Rd.		;Glasgow;Mt;59230;USA
x-mozilla-cpt:;0
fn:Gar Nelson
end:vcard

--------------FC3BB18DD90CCDB2B5DE3FAF--