Article 51ZF7 how to access private network in openvpn

how to access private network in openvpn

by
packets
from LinuxQuestions.org on (#51ZF7)
I'm using centos 6 and was able to setup openvpn, successfully connect to it and was working fine. My OpenVPN server has 2 IP (wan and lan). My concern is I can't connect to the servers on the lan subnet. I am not sure if this is because of openvpn config or just routing.

openvpn wan ip = 1.1.1.1
openvpn lan ip = 10.0.1.7

I have servers in 10.0.1.0/24 that I need to access. Can someone help on it?

server.conf

Code:# OpenVPN Port, Protocol and the Tun
port 1194
proto udp
dev tun

# OpenVPN Server Certificate - CA, server key and certificate
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/members.crt
key /etc/openvpn/server/members.key

#DH and CRL key
dh /etc/openvpn/server/dh.pem
crl-verify /etc/openvpn/server/crl.pem

# Network Configuration - Internal network
# Redirect all Connection through OpenVPN Server
server 10.10.1.0 255.255.255.0
push "redirect-gateway def1"

# Using the DNS from https://dns.watch
push "dhcp-option DNS 84.200.69.80"
push "dhcp-option DNS 84.200.70.40"

#Enable multiple client to connect with same Certificate key
duplicate-cn

# TLS Security
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
auth SHA512
auth-nocache

# Other Configuration
keepalive 20 60
persist-key
persist-tun
comp-lzo yes
daemon
user nobody
group nobody

# OpenVPN Log
log-append /var/log/openvpn.log
verb 3

route 10.0.1.0 255.255.255.0
push "route 10.0.1.0 255.255.255.0"
client-to-clientclient.ovpn

Code:client
dev tun
proto udp
remote 1.1.1.1 1194
<ca>
XXXXX
</ca>
<cert>
XXXXX
</cert>
<key>
XXXXX
</key>
cipher AES-256-CBC
auth SHA512
auth-nocache
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
resolv-retry infinite
compress lzo
nobind
persist-key
persist-tun
mute-replay-warnings
verb 3Here is my routing in the linux server

Code:Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
1.1.1.0 0.0.0.0 255.255.255.240 U 0 0 0 eth0
10.4.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.10.1.0 10.10.1.2 255.255.255.0 UG 0 0 0 tun0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 1.1.1.1 0.0.0.0 UG 0 0 0 eth0latest?d=yIl2AUoC8zA latest?i=-qZv1jwlmEk:wemDnPgir5E:F7zBnMy latest?i=-qZv1jwlmEk:wemDnPgir5E:V_sGLiP latest?d=qj6IDK7rITs latest?i=-qZv1jwlmEk:wemDnPgir5E:gIN9vFw-qZv1jwlmEk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments