Subject: NAT configuration question
To: None <netbsd-help@netbsd.org>
From: James Wetterau <jwjr@panix.com>
List: netbsd-help
Date: 03/15/2000 15:51:55
I have a mediaone connection and use ipf and ipnat to allow multiple
PCs to communicate via my netbsd packet filter and NAT box.  I
recently wanted to allow PC's to communicate to a voice over IP
telephony service (www.dialpad.com).  The rules I established in my
NAT configuration to make this happen were:

rdr ep1 0/0 port 51200 -> 10.0.0.7 port 51200 udp
rdr ep1 0/0 port 51201 -> 10.0.0.7 port 51201 udp
rdr ep1 0/0 port 51210 -> 10.0.0.7 port 51210 tcp

Note the hard-coded 10.0.0.7 there.  I would like to make the actual
internal address a dynamic parameter.

The www.dialpad.com page describes Linux configuration where you use
the outbound TCP connection on a particular port to act as a "trigger"
for establishing the end-point dynamically.  Here's the example of
Linux IP Masquerading rules they give:

/usr/sbin/ipmasqadm autofw -A -v -u -r udp 51200 51201 -c tcp 7175

I wondered if I could use ipnat similarly, so any PC on my internal
net that initiates an outbound connection on port 7175 would cause the
rdr rules to take effect automatically, and perhaps cause them to be
expunged or timed out after a certain interval or on termination of a
particular connection?

Regards,
James Wetterau