Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jul 2001 00:50:42 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Joe Clarke <marcus@marcuscom.com>
Cc:        smnoldelinux@mediaone.net, freebsd-questions@FreeBSD.ORG
Subject:   Re: Using syslogd
Message-ID:  <20010704005042.E1476@blossom.cjclark.org>
In-Reply-To: <20010703140850.Y27505-100000@shumai.marcuscom.com>; from marcus@marcuscom.com on Tue, Jul 03, 2001 at 02:09:53PM -0400
References:  <20010703135844.N2342-100000@bsd.smnolde.com> <20010703140850.Y27505-100000@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 03, 2001 at 02:09:53PM -0400, Joe Clarke wrote:
> Make sure /etc/syslog.conf does not contain any spaces.  Everything should
> be TAB separated.  If you use spaces, things will fail silently. 

No. man syslog.conf

                                                                  The selector
     field is separated from the action field by one or more tab characters or
     spaces.

     Note that if you use spaces as separators, your syslog.conf might be
     incompatible with other Unices or Unix-like systems.  This functionality
     was added for the ease of configuration (e.g. it is possible to cut-and-
     paste into syslog.conf ), and to avoid possible mistakes.  This change
     however preserves backwards compatibility with the old style of the
     syslog.conf (i.e. tab characters only).

You can use spaces in a FreeBSD syslog.conf(5)

[snip]

> On Tue, 3 Jul 2001 scott.nolde@mediaone.net wrote:
> 
> > I'm having a helluva time getting syslogd to log the syslog packets from a
> > cisco router.  Here's my setup:
> >
> > in /etc/rc.conf:
> > syslogd_enable="YES"
> > syslogd_flags="-a 192.168.1.249"

Here's your problem. It's a combination of a misunderstanding of the
syntax and a syslogd(8) bug. You want,

    syslogd_flags="-a 192.168.1.249/32"

What you have is interpreted as,

    syslogd_flags="-a 192.168.1.249/24"

Since,

             ipaddr/masklen[:service]    Accept datagrams from ipaddr (in the
                                         usual dotted quad notation) with
                                         masklen bits being taken into account
                                         when doing the address comparison.
                                         ...
                                                                           If
                                         ipaddr is IPv4 address, a missing
                                         masklen will be substituted by the
                                         historic class A or class B netmasks
                                         if ipaddr belongs into the address
                                         range of class A or B, respectively,
                                         or by 24 otherwise.

Which is your syntax mistake.

However, you might expect this still to work. But there is what I
would considerall a bug in syslogd(8). All comparisons would fail if
someone included host-bits in their network number. I committed a fix
for this in CURRENT a night or two ago and should be MFC'ing it early
next week.

Also, if you have trouble with syslogd(8) in the future, always try
the debug mode (run at the command line with the '-d' option) to see
exactly what it is up to.
-- 
Crist J. Clark                           cjclark@alum.mit.edu

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010704005042.E1476>