Subject: ipnat and local network troubles..
To: None <netbsd-users@NetBSD.org>
From: andrej misovic <ado@nirvanaclub.sk>
List: netbsd-users
Date: 09/15/2003 19:38:33
hello,
I have a problems with NAT in netbsd

I try to explain my situation:

I'm on local network, which have a router from my
ISP, and this router I can't administrate...,
I would like to add other 2 new local networks in
existing one..

Problem is, that router from ISP don't accept others
networks, as is 192.168.1 C network,
that I decide, that my netbsd router will have IP address
from that network and new networks will be NATed to this network..

ISP router/gw ------------------ 192.168.1.0/255.255.255.224 
--------------------------
(192.168.1.1)             |
                                     |
                                     |
                                   NetBSD router  192.168.1.30 
(interface rtk2)
                                                |
                                                |
                                                 --------------- first 
new network - i rtk1 (for example 192.168.2.0/255.255.255.0)
                                                |
                                                |
                                                 --------------- second 
new network -i rtk0 (192.168.3.0/255.255.255.0)


okay, I started with first network, I create NAT table for it like this:

map rtk2 192.168.2.0/255.255.255.0 -> 192.168.1.30/255.255.255.224 proxy 
port ftp ftp/tcp
map rtk2 192.168.2.0/255.255.255.0 -> 192.168.1.30/255.255.255.224 
portmap tcp/udp 40000:60000
map rtk2 192.168.2.0/255.255.255.0 -> 192.168.1.30/255.255.255.224

now I want to get from new network to old..
I tryed to ping netbsd router, everything
is okay, then I tryed ping ISP router
and no packets come back..
I start tcpdump and I saw something strange,
NAT rewrite packets headers from network with IP address of ISP router,
not with address assigned to rtk2 interface, which make NAT
it seems that ISP router pings itself and that is stupid, and for this
reasons why packets don't came back..

when I try to connect to ISP router, noone packet go thru rtk2 interface...
I don't know where is a problem, but I probably made some mistake...

thx for your opinions...

			ado


-- 

   >>  jabber: ado@njs.netlab.cz   <<
   >>  e-mail: ado@nirvanaclub.sk  <<
----------------------------------------
// just visit> http://www.nirvanaclub.sk