Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
12-26-2008, 03:40 PM
|
#1
|
Member
Registered: Jul 2004
Location: Metro Detroit
Distribution: SUSE 10, 11.1 & DSL
Posts: 35
Rep:
|
OpenVPN Bi-Directional (server-to-server)... HOW?
HELP! I am attempting to setup a OpenVPN connection that will allow traffic to go from any workstation on Network A to any workstation on Network B (and vice-versa)
Network A is as follows.
OpenVPN server IP subnet = 192.168.143.0
OpenVPN server IP address = 192.168.143.12
VPN Network subnet = 10.14.30.0
VPN Network address = 10.14.30.1
Network B is as follows.
OpenVPN client IP subnet = 192.168.163.0
OpenVPN cclient IP address = 192.168.163.8
VPN Network subnet = 10.14.30.0
VPN Network address = 10.14.30.6
Using the following configuration files, I can establish a connection from the client to the server. Also, the client is able to ping any workstation on the server network. For example 192.168.16.8 can ping any 192.168.143.0 address. That direction works well. However, the server cannot ping the client (192.168.143.12 (VPN server) cannot ping 192.168.163.8). But 192.168.143.12 CAN ping 10.14.30.6 so I know that the traffic from the VPN server is getting to the client machine, just not to the right device. Also, other than the VPN client on network B (192.168.163.8) no other workstation on Network B can ping anything on network A, despite having the router on Network B routing 192.168.143.0 traffic to 192.168.163.8.
Any ideas? Can OpenVPN be a conduit that will allow traffic from any workstation on Network A to communicate with and workstation on Network B?
Here are the config files.
* server.conf
port 1194
proto udp
dev tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
server 10.14.30.0 255.255.255.0
push "route 192.168.143.0 255.255.255.0"
keepalive 10 120
comp-lzo
persist-key
persist-tun
max-clients 3
status openvpn-status.log
verb 5
mute 20
client-config-dir ccd
route 192.168.163.0 255.255.255.0
client-to-client
push "route 192.168.163.0 255.255.255.0"
* client3 (located in /etc/openvpn/ccd/)
iroute 192.168.163.0 255.255.255.0
* client.conf
client
dev tun
proto udp
remote xxx.xxx.xxx.xxx 1194
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client3.crt
key /etc/openvpn/client3.key
comp-lzo
verb 3
mute 20
|
|
|
12-28-2008, 12:17 AM
|
#2
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Most likely a routing problem.
Can you post the output of "route" on both machines?
|
|
|
12-28-2008, 09:20 AM
|
#3
|
Member
Registered: Jul 2004
Location: Metro Detroit
Distribution: SUSE 10, 11.1 & DSL
Posts: 35
Original Poster
Rep:
|
Here's the routes...
Server:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.14.30.2 * 255.255.255.255 UH 0 0 0 tun0
10.66.1.0 10.14.30.2 255.255.255.0 UG 0 0 0 tun0
10.14.30.0 10.14.30.2 255.255.255.0 UG 0 0 0 tun0
192.168.143.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.143.1 0.0.0.0 UG 0 0 0 eth1
Client:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.14.30.5 * 255.255.255.255 UH 0 0 0 tun0
192.168.163.0 * 255.255.255.0 U 0 0 0 eth0
10.14.30.0 10.14.30.5 255.255.255.0 UG 0 0 0 tun0
192.168.143.0 10.14.30.5 255.255.255.0 UG 0 0 0 tun0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.163.1 0.0.0.0 UG 0 0 0 eth0
|
|
|
12-28-2008, 03:29 PM
|
#4
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Hopefully I've read everything correctly, but as I see things, you need to add a route on the server to see the client network (192.168.163.0/255.255.255.0 to use tun0). Not quite sure why
Code:
route 192.168.163.0 255.255.255.0
isn't working, but I don't use this setup.
Try your openvpn logs to see if there's an error on trying to set this route on startup.
|
|
|
12-28-2008, 03:31 PM
|
#5
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Actually, it's probably a ccd problem - what is in /etc/openvpn/ccd? Did you create a client file?
|
|
|
12-28-2008, 04:11 PM
|
#6
|
Member
Registered: Jul 2004
Location: Metro Detroit
Distribution: SUSE 10, 11.1 & DSL
Posts: 35
Original Poster
Rep:
|
CCD file is as follows
* client3 (located in /etc/openvpn/ccd/)
iroute 192.168.163.0 255.255.255.0
I'll look in the log file regarding the route suggestion.
Thank you for your assistance thus far. Today being Sunday I am away from the hardware but will jump back into he deep end tomorrow morning.
Last edited by n8tgc; 12-30-2008 at 04:18 PM.
|
|
|
01-19-2009, 09:23 PM
|
#7
|
LQ Newbie
Registered: Jan 2009
Posts: 1
Rep:
|
Did you ever figure this out?
I'm trying to do the same thing, create a site-to-site VPN with two linux machines using OpenVPN. Why wouldn't you use a tap0 device on the client (or Network B) machine too?
|
|
|
All times are GMT -5. The time now is 01:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|