Subject: to route two routes
To: netbsd-help <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 04/28/2002 16:03:43
Hello everyone, 

I obviously don't know what I'm talking about.  Otherwise, I'd be done
already.  Oh, well.  Would anyone like to alleviate my ignorance?

I don't seem to know how to get my friend's VPN router routing.  Each router can ping the other's Ethernet interface address (via ppp0), but neither one can
ping any hosts on the other's LAN.  

He has:
	
	At work 192.168.2/24.
	At home 192.168.1/24

I set up a VPN with iptunnel.  The box at work looks like this:

$ ifconfig ppp0
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 192.168.2.51 -> 192.168.2.50 netmask 0xffffff00
        inet6 fe80::260:8ff:fec8:88c4%ppp0 -> :: prefixlen 64 scopeid 0x3

I can ping the Ethernet interface of the work box from the home box:

home# route -n get gateway
   route to: 192.168.2.10
destination: 192.168.2.0
       mask: 255.255.255.0
    gateway: 192.168.2.50
 local addr: 192.168.2.50
  interface: ppp0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0
home# ping -o gateway
PING gateway.equatejobs.com (192.168.2.10): 56 data bytes
64 bytes from 192.168.2.10: icmp_seq=0 ttl=255 time=72.907 ms

... The routing rules on the work box are:

gateway$ route show |perl -pe'exit if /Internet6/'
Routing tables

Internet:
Destination      Gateway            Flags
default          192.168.2.1        UG
loopback         127.0.0.1          UG
localhost        127.0.0.1          UH
192.168.0.0      link#1             U
192.168.1.0      192.168.2.51       UG
192.168.2.1      0:20:78:d9:fc:d4   UH
192.168.2.3      0:80:ad:86:8b:3c   UH
192.168.2.50     192.168.2.51       UH
192.168.2.51     link#1             UH
 
... but from home I can't ping any hosts at work:

home# route -n get az; ping -o az
   route to: 192.168.2.3
destination: 192.168.2.0
       mask: 255.255.255.0
    gateway: 192.168.2.50
 local addr: 192.168.2.50
  interface: ppp0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0
PING az.equatejobs.com (192.168.2.3): 56 data bytes
^C
----az.equatejobs.com PING Statistics----
9 packets transmitted, 0 packets received, 100.0% packet loss


Sigh.  I'm sure I've bunged this up completely, because I can sense the 
conceptual blackness all around.  I don't know how these tables are 
*supposed* to look (evidently), so no number of "route add"s will help.  

Any advice humbly solicited.  Thanks.  

--jkl