I'm just new to openvpn and was able to set it up a couple of days ago in a linux machine centos 6. My openvpn server has 2 IP Address (1 wan and 1 lan). I can connect on the openvpn and verified working when checking my ip at
https://www.ipchicken.com/. My issue is I need to access the file server in the local lan.
openvpn wan ip: 1.2.3.4
openvpn lan ip: 10.0.1.7
file server lan ip: 10.0.1.2
If I'm connected, I can't ping 10.0.1.2. But if I'm logon on the linux machine, I can ping 10.0.1.2. I tried many changes e.g. change route, different config but still can't access the file server. I'm lost and need to dig more but hopefully someone on this forum can help me out fix the issue.
Below is my server.conf in openvpn server
# 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/server.crt
key /etc/openvpn/server/server.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 public DNS
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 208.67.222.222"
#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-client
Here is my client.ovpn
client
dev tun
proto udp
remote 1.2.3.4 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 3