Welcome to FreeBSDFreaks.net!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problems logging w/ IPF on FreeBSD 5.3-STABLE

 
   FreeBSD Hosting (Home) -> FreeBSD Stable RSS
Next:  ohphone 1.4.1 FreeBSD 5.3 Stable  
Author Message
FMorales

External


Since: Dec 01, 2004
Posts: 1



(Msg. 1) Posted: Wed Dec 01, 2004 10:31 am
Post subject: Problems logging w/ IPF on FreeBSD 5.3-STABLE
Archived from groups: mailing>freebsd>questions (more info?)

Hello all i recently installed FreeBSD 5.3 and am so far extremely
pleased with it. I read the section in the handbook that discussed
setting up IPF w/ FreeBSD 5.x, and also how to turn on logging and
such. Well IPF works perfectly, however my logging is NOT going
where it's supposed to. I used the same files the tutorial did,
that is:
/var/log/ipfilter.log
etc... I only "log" for the "block" rules, however the data that's
supposed to be written to my log file is NOT being written there
at all. My messages seem to be written to:
/var/log/security and
/var/log/messages
instead of /var/log/ipfilter.log. The important thing is i found
where things are being logged, however i was so stoked to get
everything setup and running, then this problem. Now it's just
a matter of principle and seeing where i went wrong. I offer the
following list of configuration settings, and information about
my current setup and system. If anyone needs more information
please ask i will be more than happy to provide it. Any help or a
point in the right direction would be greatly appreciated. I'm
sure it's something very silly i've done and am just overlooking.
Thanks in advance all.

FMorales...

System:
FreeBSD 5.3-RELEASE
AMD Athlon XP 1600+
512MB RAM

-- Alright lets run down the list, first things first. I decided
-- to recompile my kernel w/ the needed options to actually build
-- IPF etc.. into the kernel. I used a simple config named "Test"
-- here is the output showing the needed 'options' are there:

bash-2.05b$ cat /usr/src/sys/i386/conf/Test | grep "IPFILTER" | head -3
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK

-- How i built, and installed the kernel were as follows:
bash-2.05b$ cd /usr/src
bash-2.05b$ make buildkernel KERNCONF=Test
bash-2.05b$ make installkernel KERNCONF=Test

-- After which i rebooted, and everything went ok.

-- Next we make sure we're running the correct kernel:
bash-2.05b$ uname -i
Test

-- Lets make sure our log file exists:
bash-2.05b$ ls -la /var/log/ipfil*
-rw-r--r-- 1 root wheel 0 Nov 27 14:29 /var/log/ipfilter.log

-- Ok lets be sure we added the needed options to /etc/rc.conf :
bash-2.05b$ cat /etc/rc.conf | grep "ip"
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipmon_enable="YES"
ipmon_flags="-Ds"

-- Lets make sure we have the correct values in /etc/syslog.conf:
bash-2.05b$ cat /etc/syslog.conf | grep "local"
local0.* /var/log/ipfilter.log

-- This entry is the FIRST one in /etc/syslog.conf. (NOTE: Using
-- local0.* OR Local0.* has no effect on the outcome)

-- We also told it to rotate our logs everyday at midnight:
bash-2.05b$ cat /etc/newsyslog.conf | grep "ipfilter"
/var/log/ipfilter.log 600 15 * $D0 JN

Ok all config looked ok. Next i remembered to restart syslogd.
I first did it with: kill -HUP <pid> after getting a valid pid.
I have ALSO rebooted several times just incase, no dice. Next
i read the syslogd manpage and restarted syslogd using:
syslogd -s -v -v
to get verbose logging. As i said before it DOES log to both
/var/log/security and
/var/log/messages
Now the output from a blocked packet was this: (I block telnet
both ways so when i try to telnet this is what gets written)

Nov 29 17:47:01 <security.warn> altf2o ipmon[177]:
17:47:00.419095 rl0 @0:19 b x.x.x.x,62902 ->
z.z.z.z,23

So it's apparent "security.*" in /etc/syslog.conf is picking it
up, but i'm not sure why if it should be comming in to 'syslogd'
as "local0.*" according to the Handbook. (Note: The output in
BOTH /var/log/security and /var/log/messages is identical)
Lastely we check 'ipmon' to be sure it's started and with the
correct options:

bash-2.05b$ ps -aux | grep "ipmon" | head -1
root 177 0.0 0.3 1856 1400 ?? Ss 5:52PM 0:00.01 ipmon -Ds

*whew* That's it, hopefully that's enough for someone to spot
my (i'm sure silly) mistake. Thanks again all...


_______________________________________________
freebsd-questions DeleteThis @freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

 >> Stay informed about: Problems logging w/ IPF on FreeBSD 5.3-STABLE 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
FreeBSD-stable: XFree86 + Radeon 9200 - stability problems? - Hello! I'm just wondering; is anybody else having stability problems with XFree86 and an ATI Radoen 9200 card? The problem is that Xfree86 aborts very often (almost every second day). The only message I find in /var/log/messages is: May 22 19:22:30..

Freebsd STABLE - I am using 5.2 realese and using CTM to get STABLE In the CTM ftp I found these folders 08/07/03 12:00AM <DIR> cvs-cur 01/04/02 12:00AM <DIR> ports-cur 02/11/01 12:00AM <DIR> src-2.2 08/07/03 12:00AM ...

FreeBSD 5-STABLE - ... is it production quality? I do notice they say Production Release on the FreeBSD.org page, and 4.10 being legacy, but from experience.. has anyone had any significant problems? I'd be doing it from a fresh-install, rather than an upgrade.. and m...

FreeBSD 5.4-STABLE - I re-built my 5.3 system yesterday after cvsup ran yesterday in the A.M. After a rebooting I get: # uname -v FreeBSD 5.4-STABLE #5: Sun Apr 17 16:32:09 CDT 2005 jjr@www.larush.com:/usr/obj/usr/src/sys/GENERIC I didn't see any annoucement about..

ohphone 1.4.1 FreeBSD 5.3 Stable - Hello, anybody there has tried ohphone 1.4.1 in FreeBSD 5.3 Stable? I have working sound (output good. Input, well the mic records sound, not good quality). Ophone registers to gatekeeper, but no sound is produced while a call is in course. Error..
   FreeBSD Hosting (Home) -> FreeBSD Stable All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]