Subject: Re: Setting up ipnat with NetBSD and OSX
To: Andrew Gillham <gillham@vaultron.com>
From: Ian P. Thomas <ipt@solo.scraemondaemon.org>
List: netbsd-users
Date: 12/28/2001 18:03:04
On Friday 28 December 2001 05:33 pm, you wrote:
> On Fri, Dec 28, 2001 at 04:51:13PM -0500, Ian P. Thomas wrote:
> > 	I've been trying to get my OSX box to connect to the internet using my
> > NetBSD box.  I've read through the documentation in the Basic NetBSD
> > Networking, but I'm still not able to connect to the web from OSX.
> >
> > 	Here are the three rules for ipnat.conf
> >
> > 	# IP Network Address Translation rules
> > 	map ppp0 192.168.3.1/24 -> 0/32 proxy port ftp ftp/tcp
> > 	map ppp0 192.168.3.1/24 -> 0/32 portmap tcp/udp 40000:60000
> > 	map ppp0 192.168.3.1/24 -> 0/32
> >
> > 	I have my NetBSD box listed as the router with OSX.  Its IP is
> > 192.168.3.1.  The OSX box IP is 192.168.3.2.  I can ping either box and
> > ssh into each box from the other.  On my OSX box, however, I get no route
> > to host whenever I try to ping, traceroute, or do anything beyond the
> > NetBSD box.  Any hints on what might be wrong?  I'm new to networking so
> > if there are any more links out there, let me know.
>
> Do you have ip forwarding turned on?
> Check with:
> 	sysctl net.inet.ip.forwarding
>
> If it is set to '0' you need to enable it:
> 	sysctl -w net.inet.ip.forwarding=1
>
> If this is not the problem, then forward the output of 'netstat -nr' on
> your NetBSD box, the output of 'ipnat -l', 'ifconfig -a', and how about
> 'netstat -nr' on the Mac also?
>
> -Andrew
	The output of netstat -nr on the NetBSD box
Internet:
Destination        Gateway            Flags     Refs     Use    Mtu  Interface
default            128.205.200.79     UGS         1      338   1524  ppp0
127                127.0.0.1          UGRS        0        0  33228  lo0
127.0.0.1          127.0.0.1          UH          1        0  33228  lo0
128.205.200.79     128.205.233.70     UH          1        0   1524  ppp0
192.168.3          link#1             UC          1        0   1500  fxp0

	The output of ipnat -l 
List of active MAP/Redirect filters:
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

List of active sessions:

	No active session.  This probably isn't good.  ifconfig -afxp0: 
flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:02:b3:1a:b2:81
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 192.168.3.1 netmask 0xffffff00 broadcast 192.168.3.255
        inet6 fe80::202:b3ff:fe1a:b281%fxp0 prefixlen 64 scopeid 0x1
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
        inet 127.0.0.1 netmask 0xff000000
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet6 ::1 prefixlen 128
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524
        inet 128.205.233.70 -> 128.205.200.79 netmask 0xffff0000
        inet6 fe80::202:b3ff:fe1a:b281%ppp0 -> :: prefixlen 64 scopeid 0x3
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
tun0: flags=10<POINTOPOINT> mtu 1500

	Darwin's netstat -nr.  I sshed in to get it.
Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            192.168.3.1        UGSc        1        0      en0
127.0.0.1          127.0.0.1          UH          5     1467      lo0
192.168.3          link#2             UC          0        0      en0
192.168.3.1        0:2:b3:1a:b2:81    UHLW        3      673      en0   1030
192.168.3.2        0:3:93:4c:52:5e    UHLW        0        8      lo0

	Am I missing something obvious or is Mac OSX just a little odd?

Ian

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