Hi all,
I have my openvpn running and connecting fine from my laptop. Now I want to connect to hosts behind the router from it so I access them by name. I can currently access them by IP address, but that is not good enough as I have many things that depend on hostnames i.e. git. I have a feeling this is a routing issue but I am not a network engineer.
Of course I can always add entries in my /etc/hosts file, but that is not very clean.
This is the file /etc/config on the router:
# created Sat Mar 14 16:02:44 EDT 2020
config openvpn 'Home'
option enabled '1'
option config '/etc/openvpn/server.conf'
After reading
https://openvpn.net/community-resources/how-to/#scope I tried to add:
client-to-client
push "route 192.168.1.0 255.255.255.0"
push "route 10.13.0.0 255.255.255.0"
route 192.168.1.0 255.255.255.0
But I am not sure where to create the ccd/client2 file as the ccd directory was never created.
Here are my files:
This file is located at /etc/openvpn on the router
# created Sat Mar 14 16:02:44 EDT 2020
verb 4
user nobody
group nogroup
dev tun0
port 1194
proto udp
server 192.168.1.0 255.255.255.0
topology subnet
client-to-client
keepalive 10 120
duplicate-cn
push "dhcp-option DNS 10.13.0.1"
push "redirect-gateway def1"
# Uncomment for logging:
# log "/tmp/openvpn.log"
<dh>
-----BEGIN DH PARAMETERS-----
stuff
-----END DH PARAMETERS-----
</dh>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
stuff
-----END OpenVPN Static key V1-----
</tls-crypt>
<ca>
-----BEGIN CERTIFICATE-----
stuff
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
stuff
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
stuff
-----END PRIVATE KEY-----
</key>
This is the ovpn file on my laptop
# created Sat Mar 14 16:02:44 EDT 2020
verb 4
dev tun
nobind
client
remote my_ip 1194 udp
auth-nocache
remote-cert-tls server
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
stuff
-----END OpenVPN Static key V1-----
</tls-crypt>
<ca>
-----BEGIN CERTIFICATE-----
stuff
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
stuff
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
stuff
-----END PRIVATE KEY-----
</key>
Any suggestions would be most appreciated!