OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: windswept321 on April 05, 2020, 05:19:42 pm

Title: OPNsense OpenVPN client - can't set remote networks...
Post by: windswept321 on April 05, 2020, 05:19:42 pm
Hi,

I'm in the position of needing to connect to a remote network while on COVID-19 lockdown.

The setup is with two OPNsense boxes - an openvpn server and a client. The server is working fine and is fully working with my local (to me) viscosity client, which fetches available networks from the server when it connects.

I have the OPNsense client box connecting to the server ok (shows as connection up and has an IP) but I can't seem to set the remote routes. I took the same configuration set in the server for VLANs etc but I get errors when any route is set in the client (even a single ip range):

ERROR: FreeBSD route add command failed: external program exited with error status: 1

Here is the full set I want to get working (currently I get an error for each one when set in the GUI):
192.168.0.0/24,192.168.4.0/24,192.168.20.0/24,192.168.21.0/24,192.168.30.0/24,192.168.40.0/24

I can't ping hosts on the remote networks and traceroute gets stuck at the local OPNsense box.

I don't need to redirect all traffic over VPN, only traffic intended for remote network device destinations.

Can anyone help me with adding the remote network routes for this please?
Title: Re: OPNsense OpenVPN client - can't set remote networks...
Post by: chemlud on April 05, 2020, 05:57:22 pm
In both client and server config you must enter the remote networks (IPv4 Remote Networks, as CSV, not spaces). Add some decent firewall rules to the openVPN tab on both sides and it should work. :-)

PS: hopefully none of the remote networks are available locally...
Title: Re: OPNsense OpenVPN client - can't set remote networks...
Post by: windswept321 on April 05, 2020, 06:29:38 pm
Thanks for responding.
Even this gives one of the errors:
192.168.0.0/24

ERROR: FreeBSD route add command failed: external program exited with error status: 1

Multiple sets gives one error per set.
Title: Re: OPNsense OpenVPN client - can't set remote networks...
Post by: chemlud on April 05, 2020, 06:38:25 pm
But these nets are NOT available locally on client opnsense?
Title: Re: OPNsense OpenVPN client - can't set remote networks...
Post by: windswept321 on April 05, 2020, 06:44:53 pm
Yes, the client only has 192.168.1.0 locally.
Title: Re: OPNsense OpenVPN client - can't set remote networks...
Post by: windswept321 on April 06, 2020, 07:05:52 pm
After increasing the logging verbosity, I see the error is due to duplicate routes (local and fetched from remote). The issue must be something else, in need of a new post.