summaryrefslogtreecommitdiffstats
path: root/sbin/natd
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-11-27 11:06:02 +0000
committerru <ru@FreeBSD.org>2001-11-27 11:06:02 +0000
commite129a9f15eea3cbcb1f0c41dd41c880b7ede7eb2 (patch)
tree2a2a78f194dcc54d93d31f53c80ca9c5b0d10c11 /sbin/natd
parent3c293c52fd17eb62317ce21a6a3613d80b6eea80 (diff)
downloadFreeBSD-src-e129a9f15eea3cbcb1f0c41dd41c880b7ede7eb2.zip
FreeBSD-src-e129a9f15eea3cbcb1f0c41dd41c880b7ede7eb2.tar.gz
Make -log_ipfw_denied active by default with -verbose.
Discussed with: phk
Diffstat (limited to 'sbin/natd')
-rw-r--r--sbin/natd/natd.82
-rw-r--r--sbin/natd/natd.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/sbin/natd/natd.8 b/sbin/natd/natd.8
index a6d927b..ff213a4 100644
--- a/sbin/natd/natd.8
+++ b/sbin/natd/natd.8
@@ -466,6 +466,8 @@ The range will be cleared for all rules on startup.
Log when a packet can not be re-injected because an
.Xr ipfw 8
rule blocks it.
+This is the default with
+.Fl verbose .
.El
.Sh RUNNING NATD
The following steps are necessary before attempting to run
diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index 351d652..9d5fb17 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -161,7 +161,7 @@ int main (int argc, char** argv)
dynamicMode = 0;
logDropped = 0;
logFacility = LOG_DAEMON;
- logIpfwDenied = 0;
+ logIpfwDenied = -1;
/*
* Mark packet buffer empty.
*/
@@ -170,6 +170,11 @@ int main (int argc, char** argv)
ParseArgs (argc, argv);
/*
+ * Log ipfw(8) denied packets by default in verbose mode.
+ */
+ if (logIpfwDenied == -1)
+ logIpfwDenied = verbose;
+/*
* Open syslog channel.
*/
openlog ("natd", LOG_CONS | LOG_PID | (verbose ? LOG_PERROR : 0),
OpenPOWER on IntegriCloud