[vox-tech] natworking

Jeff Newmiller vox-tech@lists.lugod.org
Fri, 9 Aug 2002 16:41:13 -0700 (PDT)


On Fri, 9 Aug 2002, Chris McKenzie wrote:

> On another note, I am trying to get something to work fruitlessly.
> Unfortunately, I am running FreeBSD-4.6 and don't know if anyone could
> help.
> 
> My workstation is connected to a LAN which is connected to the internet,
> it is on a 10. network.
> 
> I own a HP 320 LX palmtop computer with Windows CE 1.0.  I have used the
> serial cable that it came with and the dial-up networking that it came
> with to connect tcp/ip over ppp over serial to my freebsd machine at
> 57600-8-N-1.  It reports that it connects successfully and a
> tcpdump -i ppp0 (the ppp device in FBSD)
> shows that in fact, the CE machine does send DNS requests.  The problem is
> that the FBSD machine can't handle them.  Here is what I have tried

Don't know what "can't handle them" means.

> sysctl net.inet.ip.forwarding = 1 (enabling packet forwarding)
>                 options IPFIREWALL
>                 options IPDIVERT    in the kernel
> gateway_enable="YES" in /etc/rc.conf to set the sysctl flag upon bootup
> and natd -i ep0 to route packets.
> 
> This failed.
> 
> Then I tried one at a time and used the standard binary 001 010 011 of the
> possibilities and failed each time.
> 
> Then I tried adding a direct link to the routing table
> the Windows CE machine is on a 192.168. network to avoid confusing (I have
> tried putting it on a 10. simultaneously with no success)
> and so I would do something like:
> route add 192.168. 10.0.0.1
> or
> route add 192.168. 10.0.0.5 (the connected workstation)
> 
> also with no success.
> 
> The pppd command I have run to connect to the CE device is
> pppd  -detach nodefaultroute crtscts lock /dev/cuaa1 57600 : &
> 
> I am wondering if anyone would know how I can get the CE's packets routed
> to the internet.

I don't know BSD, but with Linux, you need to enable packet forwarding.

Once the packet makes it through, the replies have to make it back.  I
suspect that the easiest way to accomplish this is to use the ppp proxyarp
option and specify local/remote addresses from the BSD box that are within
the 10. network.  Otherwise, you have to explain to the upstream routers
that you have a new network for them to route to, and that is probably not
something the network admins will want to configure on the routers just 
for your palmtop.

> I have ran a tcpdump on the network and the ppp at the same time to
> actually confirm that no packets make it through.  Could it be possible
> that I would have to use the ppp program and have a complex /etc/ppp
> script to connect.  This uses the tun device and I don't know if that
> would be advantagous.  Furthermore I don't know how to do it using only
> ppp.  Since this is Windows CE slattach cu tip and any other unix commands
> will fail, it must be ppp or some proprietary desktop connection protocol
> that I haven't even looked into yet.
> 
> Here is the network info upon connection
> ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
>         inet 192.168.0.101 --> 192.168.0.100 netmask 0xffffff00
> 
> Any help would be appreciated.  Thanks.
> 
> Sincerely,
> 	Christopher J. McKenzie
> 
> 	cjm@ucdavis.edu
> 	mckenzie@cs.ucdavis.edu
> 	H: (818) 991-7724
> 	C: (818) 429-3772
> 	1815 Mesa Ridge Ave
> 	Westlake Village, CA 91362
> 
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
> 

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------