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 |
Most likely a routing problem.
Can you post the output of "route" on both machines? |
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 |
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 Try your openvpn logs to see if there's an error on trying to set this route on startup. |
Actually, it's probably a ccd problem - what is in /etc/openvpn/ccd? Did you create a client file?
|
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. |
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 12:22 PM. |