Networking Forums

Networking Forums > Computer Networking > Linux Networking > Connecting 2 sites together via VTUN, routing issue

Reply
Thread Tools Display Modes

Connecting 2 sites together via VTUN, routing issue

 
 
google@johnharlow.com
Guest
Posts: n/a

 
      01-18-2005, 02:07 PM
Hi:

I've got 2 sites which I am connecting together via vtun on 2 linux
boxes. Both are behind NAT'd firewalls and act as the gateway for the
other site.

One site is 192.168.1.X and the other is 192.168.0.X and the vtun
network is 192.168.59.X.

The box running the vtun daemon is on the 192.168.1.X network and the
client is on the 192.168.0.X network. Both networks know the local tun
box as the gateway to the remote office.

Everything is working pretty well except for one thing. When the client
box connects, it is able to establish a route to 192.168.1.X via the
tun device as a part of the vtund.conf file setup. I can't figure out
how to have the server (running vtund) also establish a route to
192.168.0.X via the tun device.

I can manually enter the route command:

route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.59.2
or
route add -net 192.168.0.0 netmask 255.255.255.0 gw tun2

and it works fine.

If for any reason the connection goes down, this route is lost and is
not automatically restored when the connection resumes.

Here is what is in the server box for this connection....

cottage {
type tun; # IP tunnel
proto tcp; # TCP protocol
device tun2; # use tun2
keepalive yes; # Keep connection alive

pass ********;
up {
# Connection is Up
ifconfig "%% 192.168.59.1 pointopoint 192.168.59.2";
route "add -net 192.168.0.0 netmask 255.255.255.0 gw
192.168.59.2";
};
}

For now I have a cron job watching for this to happen and fixing it,
but I am looking for info on what to put in vtund.conf to create the
appropriate route on the server when the client connects.

Thanks
John

 
Reply With Quote
 
 
 
 
Captain Dondo
Guest
Posts: n/a

 
      01-18-2005, 04:12 PM
On Tue, 18 Jan 2005 07:07:16 -0800, google wrote:

> Everything is working pretty well except for one thing. When the client
> box connects, it is able to establish a route to 192.168.1.X via the tun
> device as a part of the vtund.conf file setup. I can't figure out how to
> have the server (running vtund) also establish a route to 192.168.0.X via
> the tun device.
>


Add a route command to the vtund.conf file, thus:

XXXXX {
pass XXXXX;
type tun;
proto tcp;
encr yes;
keepalive yes;
compress lzo:9;

up {
ifconfig "%% 192.168.128.141 pointopoint 192.168.141.128 mtu 1000";
route "add -net 192.168.141.0 netmask 255.255.255.0 gw 192.168.141.128"; };
}


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting routing to link 2 sites by VPN Fred Bloggs Windows Networking 5 12-23-2007 11:51 PM
DNS Issue? Can't access Yahoo.com, MSN.com, and other sites... RDP User Windows Networking 3 02-21-2006 04:19 AM
Connecting two sites together. Yakob Moshkovich Windows Networking 2 06-25-2005 02:05 AM
3 NIC IP routing issue & local dhp client issue Grimmo' Windows Networking 6 05-04-2005 10:19 AM
Routing Problem Using NAT & Multiple SSL Web Sites Duane Hinkley Linux Networking 0 08-25-2003 02:54 PM



1 2 3 4 5 6 7 8 9 10 11