Date: Tue, 25 Jul 2000 20:53:11 -0500 From: Stephen Montgomery-Smith <stephen@math.missouri.edu> To: freebsd-security@FreeBSD.ORG Subject: Re: log with dynamic firewall rules Message-ID: <397E4487.A868B713@math.missouri.edu> References: <397E1E25.FE8731E7@math.missouri.edu>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Stephen Montgomery-Smith wrote:
>
> I would like to set up a firewall with dynamic rules to allow
> ssh from the outside. I would like these incoming ssh's logged.
> So I tried something like:
>
> ipfw add pass log tcp from any to my.computer.net 22 keep-state setup
>
OK, does everyone else agree with me that if an ipfw rule is logged
and keep-state, then one only needs to log when the rule is established -
not every time a packet passes through it?
If so, I'll send-pr the following patch:
[-- Attachment #2 --]
--- ../src/sys/netinet/ip_fw.c Sat Jul 15 19:25:45 2000
+++ sys/netinet/ip_fw.c Tue Jul 25 20:39:38 2000
@@ -1215,8 +1215,13 @@
f->timestamp = time_second;
/* Log to console if desired */
+#if STATEFUL /* stateful ipfw */
+ if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose && q==NULL)
+ ipfw_report(f, ip, rif, oif);
+#else
if ((f->fw_flg & IP_FW_F_PRN) && fw_verbose)
ipfw_report(f, ip, rif, oif);
+#endif
/* Take appropriate action */
switch (f->fw_flg & IP_FW_F_COMMAND) {
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?397E4487.A868B713>
