[Solved] I can't reach LAN behind OpenVPN

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Locked
mdanetzky
OpenVpn Newbie
Posts: 2
Joined: Tue Aug 08, 2017 5:17 am

[Solved] I can't reach LAN behind OpenVPN

Post by mdanetzky » Tue Aug 08, 2017 5:35 am

Hi, I want to allow all OpenVPN clients to reach a LAN behind one of the VPN clients. Unfortunately ping 192.168.10.11 doesn't work. sudo tcpdump -nni tun0 icmp shows no traffic arriving at the 10.188.0.24 gateway (the client which is in target LAN and OpenVPN). Otherwise all clients can reach each other using (ping) 10.188.0.0 network. Any hint will be greatly appreciated.
SERVER
cipher AES-256-CBC
script-security 2
port 1194
proto tcp
dev tun
ca ca.crt
cert apache.crt
key apache.key
dh dh2048.pem
topology subnet
server 10.188.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir /etc/openvpn/ccd
client-to-client
push "topology subnet"
push "route-gateway 10.8.0.1"
# test lan routing
push "route 192.168.10.0 255.255.255.0 10.188.0.24 1"
route 192.168.10.0 255.255.255.0 10.188.0.24
keepalive 10 120
comp-lzo no
persist-key
persist-tun
status openvpn-status.log
verb 4
sndbuf 0
rcvbuf 0
CLIENT
client
cipher AES-256-CBC
dev tun
proto tcp
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
comp-lzo no
verb 4
/etc/openvpn/ccd/client

Code: Select all

iroute 191.168.10.0 255.255.255.0

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: I can't reach LAN behind OpenVPN

Post by TinCanTech » Tue Aug 08, 2017 1:55 pm

mdanetzky wrote:
server
push "route 192.168.10.0 255.255.255.0 10.188.0.24 1"
route 192.168.10.0 255.255.255.0 10.188.0.24
These are wrong.

This is right:

Code: Select all

push "route 192.168.10.0 255.255.255.0"
route 192.168.10.0 255.255.255.0
Please also read this:
HOWTO: Expanding the scope of the VPN to include additional machines

mdanetzky
OpenVpn Newbie
Posts: 2
Joined: Tue Aug 08, 2017 5:17 am

Re: I can't reach LAN behind OpenVPN

Post by mdanetzky » Tue Aug 08, 2017 5:35 pm

Found it!
There is a typo in /etc/openvpn/ccd/client

Thanks for the help!

Locked