Subject: [Q] ipnat.conf for 2 external nics, 1 internal nic
To: None <netbsd-help@netbsd.org>
From: Henry Nelson <henry@irm.nara.kindai.ac.jp>
List: netbsd-help
Date: 08/19/2000 22:00:27
Now that I've gotten comfortable with my ipfilter/nat machine, I
thought I'd try to put in two LAN cards for external connections,
with only one card for the internal network.  I was hoping to translate
the IPs something like:
202.248.245.24 <=> 192.168.1.1 to 192.168.1.127
202.248.245.126 <=> 192.168.1.128 to 192.168.1.254

Is it possible to do something like that?  I tried the following for
ipnat.conf, but it was a total failure(*) for fxp0, although ex0 *seems*
to work as I had hoped.

map ex0 192.168.1.0/26 -> 202.48.145.24/32 proxy port ftp ftp/tcp
map ex0 192.168.1.0/26 -> 202.48.145.24/32 portmap tcp/udp 20000:40000
map ex0 192.168.1.0/26 -> 202.48.145.24/32
map fxp0 192.168.1.0/24 -> 202.48.145.126/32 proxy port ftp ftp/tcp
map fxp0 192.168.1.0/24 -> 202.48.145.126/32 portmap tcp/udp 40001:60000
map fxp0 192.168.1.0/24 -> 202.48.145.126/32

(*) Nothing seems to come in on 202.48.145.126, and nothing seems to be
able to get out from 192.168.1.132.

Does someone have a web page bookmarked that "gently" explains the
0.0.0.0/xx kind of notation?  Another with examples for multiple nics?

TIA.

henry nelson