[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] route single address through vpn


  • Subject: Re: [Openvpn-users] route single address through vpn
  • From: Erich Titl <erich.titl@xxxxxxxx>
  • Date: Wed, 21 Mar 2007 08:56:35 +0000

Max

Max Waterman wrote:
> OK, I couldn't figure out how to route through an vpn interface on 
> another machine, so I set up the machine as another openvpn host.
> 
> I've added routes to the config file as such :
> 
> route www.swimman.com 255.255.255.255

Typically routes are not used with _names_ but _addresses_

> etc
> 
> and that works fine.

Did you really use the above notation?

> 
> However, some host's ip addresses don't resolve to a single address. For 
> example :
> 
> # host www.wiebetech.com
> www.wiebetech.com is an alias for premium2.geo.yahoo.akadns.net.
> premium2.geo.yahoo.akadns.net has address 66.218.79.157
> premium2.geo.yahoo.akadns.net has address 66.218.79.158
> premium2.geo.yahoo.akadns.net has address 66.218.79.159
> premium2.geo.yahoo.akadns.net has address 66.218.79.164
> premium2.geo.yahoo.akadns.net has address 66.218.79.165
> premium2.geo.yahoo.akadns.net has address 66.218.79.166
> 
> I can set up each one as so :
> 
> # www.wiebetech.com is an alias for premium2.geo.yahoo.akadns.net.
> route 66.218.79.157 255.255.255.255
> route 66.218.79.158 255.255.255.255
> route 66.218.79.159 255.255.255.255
> route 66.218.79.164 255.255.255.255
> route 66.218.79.165 255.255.255.255
> route 66.218.79.166 255.255.255.255
> 
> and that works most of the time, but it seems that dns responds 
> differently sometimes.
> I thought that something like this would work :
> 
> route 66.218.79.0 255.255.255.0
> 
> assuming that it cycles through a whole subnet of addresses, but it fails.

Routing does not cycle through anything, it just takes the network
address masked by the netmask and compares.

> 
> I can't seem to find a detailed explanation of the format for this line. 
> Can someone enlighten me?

All depends on your underlying routing software, e.g. the OS.

For Linux using the ip command it would be

ip route add 66.218.79.0/24 via xx.xx.xx.xx device ethx

For Windoze I would have to look it up myself but in any case some kind
of _add_ keyword would be required for a number of end user equipment.
IOS based devices just use route AFAIK.

The manual is your friend here

Erich


______________________
OpenVPN mailing lists
https://lists.sourceforge.net/lists/listinfo/openvpn-users