Subject: Re: Setting up ipnat with NetBSD and OSX[solved]
To: Martin Husemann <martin@duskware.de>
From: Ian P. Thomas <ipthomas_77@yahoo.com>
List: netbsd-users
Date: 12/30/2001 19:58:35
On Sunday 30 December 2001 05:55 am, you wrote:
> I don't think this discussion gets to the point.
>
> While I usualy run a caching name server behind a NAT router, I don't
> think it should be necessary. It is not much risk in this situation,
> if you do not run it on the NAT router itself or have it listen to
> the external address (why should you want that?)
>
> Anyway, it is not *needed* to make the network behind the NAT work.
> There is another configuration error, or the original problem would
> not have shown up.
>
> How does the Mac get it's IP address and settings? Is it hardwired?
> Or do you run dhcpd? In the latter case, add
>
>  option domain-name-servers X.X.X.X;
>
> to your /etc/dhcpd.conf file. In the former case, there needs to be a
> way to explicitly tell it the DNS address (like /etc/resolv.conf in
> NetBSD).
>
> You can point the Mac to the external name server (typically of your
> ISP) and it should be able to query that just fine. If not, there is
> an error that you should fix, not hide by running a local server.
>
>
> Martin

	I'm fairly new to networking, so right now, if it works I'm happy.  
Here is a brief rundown of what was tried:

On the NetBSD box
external connection 	dialup using ppp0
internal  connection 	ethernet using fxp0

ipnat -l
map ppp0 192.168.3.0/24  -> 0.0.0.0/32  proxy port ftp ftp/tcp
map ppp0 192.168.3.0/24  -> 0.0.0.0/32  portmap tcp/udp 40000:60000
map ppp0 192.168.3.0/24  -> 0.0.0.0/32

cat /etc/resolv.conf
#nameserver 	   127.0.0.1  	right now it's uncommented
nameserver              128.205.106.1
nameserver              128.205.1.2

ipforwarding is enabled

On the OS X box,
external connection		ethernet using en0

This doesn't resolve hosts, packets make it out, but never make it back 
to the Mac.
nameserver              128.205.106.1
nameserver              128.205.1.2

This does, when running the cache only name server on the NetBSD box
nameserver 	   192.168.3.1

router 		    192.168.3.1
IP address	    192.168.3.2

You can manually set the IP on OS X, it 's a choice.  DHCP is also 
available, but unnecessary, the Mac is the only internal machine.  Any 
suggestions on getting the NetBSD box to know that although a packet 
says it's my dynamically assigned address for its source, that it 
should really go to the internal IP 192.168.3.2, where it originated?  
I thought that ipnat handled this by creating a state table similar to 
ipf?

Ian
-- 
Of Course it Runs NetBSD
www.netbsd.org

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com