IPFilter Logging?

IPFilter Logging?

Post by Rickard Borgm?ste » Sun, 07 Oct 2001 00:18:23



Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
Being used to OpenBSD systems where the IPFilter log appears in
/var/log/ipf I looked there, but there is no log.

Do I have to manually tell IPFilter to create a log file?

--

Rickard

                                              .--.        .--.
 .-------------------------------------.      |  |        |  | .-.
 |          Rickard Borgm?ster         |      |  |        |  |/  /

 |     http://www.sub.nu/~doktorn/     |   (  o  | ( () ) |  |\  \
 `-------------------------------------'   `-----'  `--'  `--' `--'

 
 
 

IPFilter Logging?

Post by pe.. » Sun, 07 Oct 2001 05:28:23



> Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
> Being used to OpenBSD systems where the IPFilter log appears in
> /var/log/ipf I looked there, but there is no log.
> Do I have to manually tell IPFilter to create a log file?

No, but you will have to tell syslog where to place logs
from local0

Then YOU will have to HUP syslogd AND create the file.

/etc/syslog.conf :
local0.info                                             /var/log/ipflog

> --
> Rickard
>                                               .--.        .--.
>  .-------------------------------------.      |  |        |  | .-.
>  |          Rickard Borgm?ster         |      |  |        |  |/  /

>  |     http://www.sub.nu/~doktorn/     |   (  o  | ( () ) |  |\  \
>  `-------------------------------------'   `-----'  `--'  `--' `--'

--
Peter H?kanson        
        IPSec  Sverige      (At the Riverside of Gothenburg, home of Volvo)
           Sorry about my e-mail address, but i'm trying to keep spam out.
           Remove "icke-reklam"and "invalid"  and it works.

 
 
 

IPFilter Logging?

Post by Rickard Borgm?ste » Sun, 07 Oct 2001 09:41:13




> > Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
> > Being used to OpenBSD systems where the IPFilter log appears in
> > /var/log/ipf I looked there, but there is no log.

> > Do I have to manually tell IPFilter to create a log file?
> No, but you will have to tell syslog where to place logs
> from local0

> Then YOU will have to HUP syslogd AND create the file.

> /etc/syslog.conf :
> local0.info                                             /var/log/ipflog

This didn't seem to help :-/

Exactly what is local0? Why should I use this? Is there any man pages or
something when I can find out about these log sources?

--

Rickard

                                               .--.        .--.
.----------------------------------------.     |  |        |  | .-.
|           Rickard Borgm?ster           |     |  |        |  |/  /

|         http://doktorn.sub.nu/         |  (  o  | ( () ) |  |\  \
`----------------------------------------'  `-----'  `--'  `--' `--'

 
 
 

IPFilter Logging?

Post by Zeni » Sun, 07 Oct 2001 12:46:52


:>

:> > Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
:> > Being used to OpenBSD systems where the IPFilter log appears in
:> > /var/log/ipf I looked there, but there is no log.
:>
:> > Do I have to manually tell IPFilter to create a log file?

        Not IPF directly, but yes. -Even in OpenBSD, IPF doesn't do the
        logging itself.  Make sure ipmon is enabled in your rc.conf:

                ipmon_enable="YES"

        Perhaps with something as well like this as well:

                ipmon_flags="-D /var/log/ipf"

:> No, but you will have to tell syslog where to place logs
:> from local0
:>
:> Then YOU will have to HUP syslogd AND create the file.
:>
:> /etc/syslog.conf :
:> local0.info                                             /var/log/ipflog
:
: This didn't seem to help :-/
:
: Exactly what is local0? Why should I use this? Is there any man pages or
: something when I can find out about these log sources?

        The syslog stuff is only needed if you use -s for ipmon, although it
        can be better using syslog as you can configure it in more detail as
        well as use newsyslog to rotate your logs, or log to a remote
        machine.

        For more info, see `man 8 ipmon'.

--

BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".

 
 
 

IPFilter Logging?

Post by Juergen Klei » Sun, 07 Oct 2001 02:21:42


Hi!

If you log with syslogd, you have to create an empty file manualy.

Regards
Jrgen



Quote:> Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
> Being used to OpenBSD systems where the IPFilter log appears in
> /var/log/ipf I looked there, but there is no log.

> Do I have to manually tell IPFilter to create a log file?

 
 
 

IPFilter Logging?

Post by pe.. » Sun, 07 Oct 2001 17:38:38





>> > Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
>> > Being used to OpenBSD systems where the IPFilter log appears in
>> > /var/log/ipf I looked there, but there is no log.

>> > Do I have to manually tell IPFilter to create a log file?
>> No, but you will have to tell syslog where to place logs
>> from local0

>> Then YOU will have to HUP syslogd AND create the file.

>> /etc/syslog.conf :
>> local0.info                                             /var/log/ipflog
> This didn't seem to help :-/
> Exactly what is local0? Why should I use this? Is there any man pages or
> something when I can find out about these log sources?

man syslog is a starting point.

local[0-7] is 8 userd-defined categories that may be used with syslog.

> --
> Rickard
>                                                .--.        .--.
> .----------------------------------------.     |  |        |  | .-.
> |           Rickard Borgm?ster           |     |  |        |  |/  /

> |         http://doktorn.sub.nu/         |  (  o  | ( () ) |  |\  \
> `----------------------------------------'  `-----'  `--'  `--' `--'

--
Peter H?kanson        
        IPSec  Sverige      (At the Riverside of Gothenburg, home of Volvo)
           Sorry about my e-mail address, but i'm trying to keep spam out.
           Remove "icke-reklam"and "invalid"  and it works.
 
 
 

IPFilter Logging?

Post by Rickard Borgm?ste » Tue, 09 Oct 2001 09:49:27




> > Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
> > Being used to OpenBSD systems where the IPFilter log appears in
> > /var/log/ipf I looked there, but there is no log.

> > Do I have to manually tell IPFilter to create a log file?
> No, but you will have to tell syslog where to place logs
> from local0

> Then YOU will have to HUP syslogd AND create the file.

> /etc/syslog.conf :
> local0.info                                             /var/log/ipflog

So now I've added local0.info to syslog.conf, just as stated above. I've
also started ipmon with -D -s but still, no logging :-( Even tried local0.*
in syslog but no difference. What am I missing?

--

Rickard

                                              .--.        .--.
 .-------------------------------------.      |  |        |  | .-.
 |          Rickard Borgm?ster         |      |  |        |  |/  /

 |     http://www.sub.nu/~doktorn/     |   (  o  | ( () ) |  |\  \
 `-------------------------------------'   `-----'  `--'  `--' `--'

 
 
 

IPFilter Logging?

Post by Zeni » Tue, 09 Oct 2001 10:30:45



:> > Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
:> > Being used to OpenBSD systems where the IPFilter log appears in
:> > /var/log/ipf I looked there, but there is no log.
:>
:> > Do I have to manually tell IPFilter to create a log file?
:> No, but you will have to tell syslog where to place logs from local0
:>
:> Then YOU will have to HUP syslogd AND create the file.
:>
:> /etc/syslog.conf :
:> local0.info                                             /var/log/ipflog
:
: So now I've added local0.info to syslog.conf, just as stated above. I've
: also started ipmon with -D -s but still, no logging :-( Even tried
: local0.* in syslog but no difference. What am I missing?

        Not sure, but if it helps here's my syslog.conf.  In this setup,
        ipmon messages go to /var/log/messages.  What does what I can't
        exactly say...I crafted this from a firewall guide some time back as
        while I'm fluent with many things, the workings of syslog isn't one
        of them.  HTH

        auth.*                                          /var/log/authlog
        *.err;kern.debug;auth.notice;mail.crit          /dev/console
        *.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
        security.*                                      /var/log/security
        mail.info                                       /var/log/maillog
        lpr.info                                        /var/log/lpd-errs
        cron.*                                          /var/log/cron
        *.err                                           root
        *.notice;news.err;local0.none                   root
        *.alert                                         root
        *.emerg                                         *

--

BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".

 
 
 

IPFilter Logging?

Post by Rickard Borgm?ste » Tue, 09 Oct 2001 21:38:30



Quote:

> Not sure, but if it helps here's my syslog.conf.  In this setup,
> ipmon messages go to /var/log/messages.  What does what I can't
> exactly say...I crafted this from a firewall guide some time back as
> while I'm fluent with many things, the workings of syslog isn't one
> of them.  HTH

> auth.*                                          /var/log/authlog
> *.err;kern.debug;auth.notice;mail.crit          /dev/console
> *.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
> security.*                                      /var/log/security
> mail.info                                       /var/log/maillog
> lpr.info                                        /var/log/lpd-errs
> cron.*                                          /var/log/cron
> *.err                                           root
> *.notice;news.err;local0.none                   root
> *.alert                                         root
> *.emerg                                         *

This is weird. I can't see here that local0* is mentioned in the line that
logs to /var/log/messages. But I'll give it i try.

--

Rickard

                                              .--.        .--.
 .-------------------------------------.      |  |        |  | .-.
 |          Rickard Borgm?ster         |      |  |        |  |/  /

 |     http://www.sub.nu/~doktorn/     |   (  o  | ( () ) |  |\  \
 `-------------------------------------'   `-----'  `--'  `--' `--'

 
 
 

IPFilter Logging?

Post by Magnu » Wed, 10 Oct 2001 04:16:59



> Have recently recompiled my FreeBSD 4.3 kernel to support IPFilter.
> Being used to OpenBSD systems where the IPFilter log appears in
> /var/log/ipf I looked there, but there is no log.

> Do I have to manually tell IPFilter to create a log file?

> --

> Rickard

These are the settings I have been using for a while and it seems to do the
job:

/etc/syslog.conf:
local0.*                                        /var/log/firewall_logs

/etc/newsyslog.conf:
/var/log/firewall_logs                  644  3     100  *     Z

/etc/rc.conf:
ipfilter_enable="YES"
ipmon_enable="YES"
ipmon_flags="-Dsv"
ipnat_enable="YES"

I hope this will work for you!

Regards,
Magnus

 
 
 

IPFilter Logging?

Post by Zeni » Wed, 10 Oct 2001 09:32:01



:>
:> Not sure, but if it helps here's my syslog.conf.  In this setup,
:> ipmon messages go to /var/log/messages.  What does what I can't
:> exactly say...I crafted this from a firewall guide some time back as
:> while I'm fluent with many things, the workings of syslog isn't one
:> of them.  HTH
:>
:> auth.*                                          /var/log/authlog
:> *.err;kern.debug;auth.notice;mail.crit          /dev/console
:> *.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
:> security.*                                      /var/log/security
:> mail.info                                       /var/log/maillog
:> lpr.info                                        /var/log/lpd-errs
:> cron.*                                          /var/log/cron
:> *.err                                           root
:> *.notice;news.err;local0.none                   root
:> *.alert                                         root
:> *.emerg                                         *
:
: This is weird. I can't see here that local0* is mentioned in the line that
: logs to /var/log/messages. But I'll give it i try.

        That's what I thought too, but then as I've said syslog is not one
        of the black arts which I practice. :-)

--

BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".

 
 
 

1. fwanalog to analyze ipfilter logs

Hello,
    Has anyone got fwanalog working to analyze their ipfilter logs? Mine is
giving me blank messages. I've got my output directory set to
/var/fwanalog.out and it's looking for ipf* logs in /var/log. It is mailing
stuff out but as i said the output messages are blank, but on manually
checking the ipf.log files there is content within them.
In my rc.conf i have:
ipmon_enable="YES"
and recently modified:
ipmon_flags="-Davs /var/log/ipf.log"
which was a suggestion, before the line was simply:
ipmon_flags="-D /var/log/ipf.log"
    neither is working. This is on FreeBSD 5.0. Any help appreciated.
Thanks.
Dave.

2. NEWBIE: Is it worth it?

3. IPFilter Log Records in OpenBSD 2.9

4. test2

5. garbage in ipfilter log

6. mount: ... rpc: timed out !!!

7. rotating ipfilter firewall log

8. Promise Fastrak-66 RAID Card beta Drivers available!!

9. logging problem of ipfilter on Solaris??

10. Check your ppp.log or ppp.tun0.log in /var/log

11. ipppd logs in /var/log/ipppd-auth.log ??

12. logging - "secure" logs don't tell me who is logging in?

13. How can I get ipppd to log in /var/log/ipppd-auth.log ????