summaryrefslogtreecommitdiffstats
path: root/sbin/natd/samples
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-06-22 04:19:08 +0000
committerbrian <brian@FreeBSD.org>1997-06-22 04:19:08 +0000
commit59a701d2eb6099d33d593a0f994d15fe5a605440 (patch)
treef925a9dd22becc0f3a478fc6b70e4f2a7475099f /sbin/natd/samples
downloadFreeBSD-src-59a701d2eb6099d33d593a0f994d15fe5a605440.zip
FreeBSD-src-59a701d2eb6099d33d593a0f994d15fe5a605440.tar.gz
Bring natd into main source tree now that the
pppd/natd combination works ok. Submitted by: Ari Suutari <ari.suutari@ps.carel.fi>
Diffstat (limited to 'sbin/natd/samples')
-rw-r--r--sbin/natd/samples/natd.cf.sample52
-rw-r--r--sbin/natd/samples/natd.test14
2 files changed, 66 insertions, 0 deletions
diff --git a/sbin/natd/samples/natd.cf.sample b/sbin/natd/samples/natd.cf.sample
new file mode 100644
index 0000000..46eee91
--- /dev/null
+++ b/sbin/natd/samples/natd.cf.sample
@@ -0,0 +1,52 @@
+#
+# Configuration file for natd.
+#
+#
+# Logging to /var/log
+#
+log no
+#
+# Incoming connections.
+#
+deny_incoming no
+#
+# Use sockets to avoid port clashes.
+#
+use_sockets no
+#
+# Avoid port changes if possible. Makes rlogin work
+# in most cases.
+#
+same_port yes
+#
+# Verbose mode. Enables dumping of packets and disables
+# forking to background.
+#
+verbose no
+#
+# Divert port. Can be a name in /etc/services or numeric value.
+#
+port 32000
+#
+# Interface name or address being aliased. Either one,
+# not both is required.
+#
+# alias_address 192.168.0.1
+interface ep0
+#
+# Alias unregistered addresses or all addresses.
+#
+unregistered_only no
+#
+# Configure permanent links. If you use host names instead
+# of addresses here, be sure that name server works BEFORE
+# natd is up - this is usually not the case. So either use
+# numeric addresses or hosts that are in /etc/hosts.
+#
+# Map connections coming to port 30000 to telnet in my_private_host.
+# Remember to allow the connection /etc/rc.firewall also.
+#permanent_link tcp my_private_host:telnet 0.0.0.0:0 30000
+#
+# Map connections coming from host.xyz.com to port 30001 to
+# telnet in another_host.
+#permanent_link tcp another_host:telnet host.xyz.com:0 30001
diff --git a/sbin/natd/samples/natd.test b/sbin/natd/samples/natd.test
new file mode 100644
index 0000000..cfdbd15
--- /dev/null
+++ b/sbin/natd/samples/natd.test
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+ if [ $# != 1 ]
+ then
+ echo "usage: natd.test ifname"
+ exit 1
+ fi
+
+ ipfw flush
+ ipfw add divert 32000 ip from any to any via $1
+ ipfw add pass ip from any to any
+
+ ./natd -port 32000 -interface $1 -verbose
+
OpenPOWER on IntegriCloud