Subject: Re: Setting up ipnat with NetBSD and OSX
To: Andrew Gillham <email@example.com>
From: Ian P. Thomas <firstname.lastname@example.org>
Date: 12/28/2001 19:56:13
On Friday 28 December 2001 06:56 pm, you wrote:
> On Fri, Dec 28, 2001 at 06:03:04PM -0500, Ian P. Thomas wrote:
> > The output of netstat -nr on the NetBSD box
> > Internet:
> > Destination Gateway Flags Refs Use Mtu
> > Interface default 184.108.40.206 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 220.127.116.11 18.104.22.168
> > UH 1 0 1524 ppp0 192.168.3 link#1
> > UC 1 0 1500 fxp0
> This looks ok to me.
> > 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
> On my /etc/ipnat.conf rules I use '0/32' instead of '0.0.0.0/32', but
> I don't think that matters.
> > fxp0:
> > 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
> This looks fine also.
> > 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
> This looks odd to me, since the default route has zero "Use", and
> there should be packets when you try to ping something out on the
> internet. E.g. if you send five pings to www.yahoo.com, the 'Use'
> counter should increase by five, whether you get a response or now.
> Your netmask is ok on the Mac right? 255.255.255.0 not 0.0.0.0?
> > Am I missing something obvious or is Mac OSX just a little odd?
> Well, as long as net.inet.ip.forwarding=1, you aren't. :)
> You might want to do this on your NetBSD box:
> tcpdump -nvvi fxp0 icmp
> Then try to ping from the Mac and confirm whether you are seeing the
> right packets.
I did as asked and it looks like the right packets are being seen.
19:29:56.964900 192.168.3.2 > 192.168.3.1: icmp: echo request (ttl 255,
id 2406)19:29:56.965027 192.168.3.1 > 192.168.3.2: icmp: echo reply
(ttl 255, id 8111)
I think this is a problem with name resolution. I'm able to
successfully ping yahoo from the Mac if I use there IP address. There
is a spot in the TCP/IP part of the Network setup that asks for DNS
servers or optionally search domain. Should I add something there?
I've tried adding my DNS servers that I use on the NetBSD box, but that
I think the solution is close. I'm going to look around on Apple's
site for some more documentation. It's like OSX wants to be like BSD,
but it's just not there yet :))
Of Cource it Runs NetBSD
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com