I have an OpenVPN server set up on my Raspberry Pi, when I installed it the guide I followed said to add a line like: push "route 192.168.1.0 255.255.255.0"
so that the server would let the client know that that network could be reached through the VPN, or so I understood.But now I'm using the Pi as a router to share a WiFi Internet connection with a computer,using the network 192.168.0.0,and so I was thinking of adding a route for that network that way, but I tried connecting before doing it and the PC can be reached without doing anything.
Doing a traceroute I saw that apparently 10.8.0.1 is the default gateway, so it can just reach it from there without a problem. So I'm wondering, what is that statement really used for? It doesn't seem to be necessary for making the client aware of the network, since all the traffic is going through the VPN anyway.
route
is used to allow a client remote access to a subnet (i.e. LAN) behind the router.push
is specified in the server config to push theroute
directive to the client upon the client connecting to the server, negating the need to have theroute
directive in the client's*.ovpn
config.