Subject: Router config. Problem
To: None <port-i386@netbsd.org>
From: madhur nigam <nigam@students.uiuc.edu>
List: port-i386
Date: 11/01/2002 13:31:55
I am a new guy to the list/netbsd so please pardon me if my question
sounds stupid.
I am trying to convert the two netbsd machines that I have into the
following
Machine 1(M1)- into a router
Machine 2(M2)- into a client that can access internet only thru M1
So I did the following
On M1 i added an alias IP address so that the ifconfig.ex0 file on M1
looked like this
inet A.B.C.D netmask 0xffffff00
inet 10.1.1.1 netmask 0xffffff00
where A.B.C.D is the IP address of M1.
i also enabled the ipfilter and ipnat in the rc.conf file.
i also created file /etc/ipnat.conf and that looked like this
map ppp0 10.1.1.1/2 -> 0/32 proxy port ftp ftp/tcp
map ppp0 10.1.1.1/2 -> 0/32 portmap tcp/udp 40000:60000
map ppp0 10.1.1.1/2 -> 0/32
also ipf.conf to look like this
pass in from any to any
pass out from any to any
#
Here i have assigned private Ip address 10.1.1.2 to M2 and 10.1.1.1 to M1
(router).
i also added line defaultrouter="10.1.1.1" in M2's rc.conf file and also
changed etc/mygate file on M2 to 10.1.1.1
after doing all this. i still cannot access my machine M2 nor can I access
the internet from M2. so basically i have screwed M2.
any pointer as to where I am messing up would be helpful.
thanks a ton
madhur