From 59a701d2eb6099d33d593a0f994d15fe5a605440 Mon Sep 17 00:00:00 2001 From: brian Date: Sun, 22 Jun 1997 04:19:08 +0000 Subject: Bring natd into main source tree now that the pppd/natd combination works ok. Submitted by: Ari Suutari --- sbin/natd/samples/natd.cf.sample | 52 ++++++++++++++++++++++++++++++++++++++++ sbin/natd/samples/natd.test | 14 +++++++++++ 2 files changed, 66 insertions(+) create mode 100644 sbin/natd/samples/natd.cf.sample create mode 100644 sbin/natd/samples/natd.test (limited to 'sbin/natd/samples') 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 + -- cgit v1.1