I want to override the routes pushed by the server in the client.
route 192.168.52.0 255.255.255.0
route 192.168.53.0 255.255.255.0
route 192.168.48.0 255.255.240.0
route 192.35.222.0 255.255.255.0
route-nopull
While this works as expected, the following errors appear in the log:
Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
Options error: option 'route' cannot be used in this context ([PUSH-OPTIONS])
Options error: option 'route' cannot be used in this context ([PUSH-OPTIONS])
Options error: option 'route' cannot be used in this context ([PUSH-OPTIONS])
Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS])
.
.
.
ERROR: Linux route add command failed: external program exited with error status: 2
What bothers me is, I am not sure where I can safely disregard the errors, or even how I can make those disappear.
Following this
https://openvpn.net/faq/overriding-a-pushed-route-in-the-clients-config-throws-an-error/, I pushedthe `route-nopull` option down after all the client routes are set. But, that didn't help.
Can anybody please help?
My full client configuration is below.
client
dev tun
remote <vpn_server_ip> 1194
nobind
cipher AES-256-CBC
auth SHA512
tls-cipher TLS-RSA-WITH-AES-256-CBC-SHA
keepalive 10 60
persist-key
persist-tun
persist-local-ip
persist-remote-ip
mssfix
tun-mtu 1500
route 192.168.52.0 255.255.255.0
route 192.168.53.0 255.255.255.0
route 192.168.48.0 255.255.240.0
route 192.35.222.0 255.255.255.0
route-nopull
remote-cert-tls server