Networking Forums

Networking Forums > Computer Networking > Linux Networking > OpenVPN: Connecting 2 private networks

Reply
Thread Tools Display Modes

OpenVPN: Connecting 2 private networks

 
 
Frank Elsner
Guest
Posts: n/a

 
      05-14-2004, 04:32 PM
Hi Networkers!

We want to connect 2 private networks over a public network using OpenVPN-1.5.0

Network-A 192.168.28.0/24
Host 192.168.28.26 tun0 10.192.168.28/10.192.168.56
routing network 192.168.56.0/24 to gw 10.192.168.56

Network-B 192.168.56.0/24
Host 192.168.56.13 tun0 10.192.168.56/10.192.168.28
routing network 192.168.28.0/24 to gw 10.192.168.28

We can "ping" the tunnel end points, so the connection works in general.

But if 192.168.28.26 does a ssh to 192.168.56.13, the connection is shown at
192.168.56.13 coming from 10.192.168.28. We think this is wrong, the connection
should show up coming from 192.168.28.26.

Given this fact, how to get from any host in Network-A to any host in Network-B
if all connections seem to come from the tunnel end at the destination host?

Kernel IP routing table on 192.168.28.26:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.192.168.56 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.28.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.56.0 10.192.168.56 255.255.255.0 UG 0 0 0 tun0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.28.1 0.0.0.0 UG 0 0 0 eth0

The config file on 192.168.28.26 reads:

# /usr/local/OpenVPN/etc/eyuphuro.cf
# ---------------------------------- VPN with eyuphuro

# daemon eyuphuro
local 192.168.28.26
remote 194.95.226.***
proto udp
port 5000
dev tun0
ifconfig 10.192.168.28 10.192.168.56
route 192.168.56.0 255.255.255.0
disable-occ
ping 15
verb 4
persist-tun
persist-local-ip
persist-remote-ip
comp-lzo

Routing table and configuration file on 192.168.56.13 are nearly identical but
with IP addr settings adopted.

If this is not sufficient more information can be given.


Kind regards, Frank Elsner
 
Reply With Quote
 
 
 
 
chris-usenet@roaima.co.uk
Guest
Posts: n/a

 
      05-17-2004, 08:24 AM
Frank Elsner <(E-Mail Removed)> wrote:
> Network-A 192.168.28.0/24
> Host 192.168.28.26 tun0 10.192.168.28/10.192.168.56
> routing network 192.168.56.0/24 to gw 10.192.168.56


> Network-B 192.168.56.0/24
> Host 192.168.56.13 tun0 10.192.168.56/10.192.168.28
> routing network 192.168.28.0/24 to gw 10.192.168.28


> But if 192.168.28.26 does a ssh to 192.168.56.13, the connection is
> shown at 192.168.56.13 coming from 10.192.168.28. We think this is
> wrong, the connection should show up coming from 192.168.28.26.


Host 192.168.28.26 is multihomed, and is also 10.192.168.28. Therefore
when you talk to a node on 192.168.56.0/24 it can be seen as either
interface. Generally you get the interface "nearest" your route, which
is why you see the 10. address rather than your preferred 192. one.

> Given this fact, how to get from any host in Network-A to any host in
> Network-B if all connections seem to come from the tunnel end at the
> destination host?


They shouldn't. Have you tried it?

Chris
 
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
What Is It With 192.168 And Private Networks? (PeteCresswell) Wireless Networks 3 01-27-2011 01:35 AM
Linking two networks via OpenVPN with one endpoint not the primarygateway MGSoto@gmail.com Linux Networking 2 06-10-2009 03:58 PM
Router with two private networks Ted B Network Routers 1 01-12-2007 08:32 AM
Connecting two private networks Simon Kissane Linux Networking 5 02-10-2006 11:23 PM
Connecting two Class C private networks under one domain. =?Utf-8?B?bW9zcXVpdG9faGlwcHk=?= Windows Networking 8 12-09-2004 01:17 PM



1 2 3 4 5 6 7 8 9 10 11