Subject: mapping ports with ipnat
To: None <muc-lists-netbsd-port-i386@moderators.muc.de>
From: Matthias Winter <ernesto_tequila@uni.de>
List: port-i386
Date: 10/17/2001 13:51:45
hi,

i searched several bsd archives for good articles, and i found several, nut
none of them solved my problem.
i have a netbsd 1.5 router (ipf , ipnat) du serve my lan. now i set up ipf
(left the config file blank, because i need no rules at the moment) and set
up ipnat like this:
map ppp0 10.0.0.0/24 -> 0/32 proxy port ftp ftp/tcp
map ppp0 10.0.0.0/24 -> 0/32 portmap tcp/udp 40000:60000
map ppp0 10.0.0.0/24 -> 0/32
the nat translation works fine, but now i tried to map port 21 (for example)
from the netbsd machine to an internal machine.the netbsd machine has the
ip: 192.168.0.6 and the machine i want to redirect to is: 192.168.0.123. Now
i added this line to ipnat.confas i read in a nat howto:
rdr rtk0 0.0.0.0/0 port 21 -> 192.168.0.123 port 21
but the redirect does not work. when i connect to the WAN ip (from the isp)
i get either the netbsd ftp daemon, or i get connection refused if i disable
ftp in inetd.conf..
What i want is, that every traffic coming in over my ethernet interface
connected to the isp (rtk0) is redirected to the internal machineand
backwards.. where is the error?
regards ernesto
p.s. i postet to de.comp.os.unix.networking but did not get any answers,
that is why i try it here..