redmat Hi guys, i have problem with my openvpn configuration. I configure a site-to-site vpn, i can reach any machine in the server internal network from the client, but i can't reach any server in the client network from the server. I think is a routing problem, this is my server configuration: port 1194 proto udp dev tun ca ca.crt cert vpn.crt key vpn.key # This file should be kept secret dh dh2048.pem server 10.2.254.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 10.0.0.0 255.255.0.0" client-to-client keepalive 10 120 comp-lzo user nobody group nobody persist-key persist-tun status openvpn-status.log verb 3 And this is my client.conf: client dev tun proto udp remote xxx.xxx.xxx.xxx 1194 remote xxx.xxx.xxx.xxx 1194 remote-random resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert client.crt key client.key ns-cert-type server comp-lzo verb 3 Server internal network is: 10.0.0.0/16 Client internal network is: 172.16.0.0/16 Thanks in advance for your help.
maikcat for lan to lan to work you need: 1) to create a ccd file for your client including iroute directive 2) add a route directive to your server config for your remote network 3) enable ip forwarding on your client. Michael.
redmat Hi maikat, thanks for the reply. Can you help me with this step, because i tried but the result is the same. My real network is: Server 10.0.0.0/16 Client 172.16.0.0/16 OpenVPN Network 10.2.254.0/24 Server ip 10.2.254.1 - P-t-P 10.2.254.2 Client ip 10.2.254.6 - P-t-P 10.2.254.5 I can reach my server network from the client with a simple route 10.0.0.0/16 via 10.2.254.5, but when i do the same route 172.16.0.0/16 via 10.2.254.2 i can't reach the client network from the server. What should i write in the ccd file? Thanks for the help
maikcat ok here we go, add this to your server config route 172.16.0.0 255.255.0.0 client-config-dir /etc/openvpn/ccd your ccd file (named client) iroute 172.16.0.0 255.255.0.0 restart both server/client services. Michael.
redmat HI Michael, i solved my problem, the issue was i used the TUN mode. I changed it to TAP and all works great 😃 However thanks for the help, have a good day!