OpenVPN and Static route

NethServer Version: 7.2.1511 (rc1)
Module: OpenVPN, Static route

hi
i create static route in "Configuration - Static route"
it’s ok, work fine

i enable OpenVPN roadwarrior server and create accounts
its ok and work

but OpenVPN push my static route in "Configuration - Static route"
how it disable?

sorry my english

Thanks for asking xcod, hope that @harry @EddieA @Hunv might help here

This is by design: clients on the remote network will be able to reach the configured routes.

If you want to disable it, you need to create a template custom for this fragment /etc/e-smith/templates/etc/openvpn/host-to-net.conf/40route

1 Like

Hello!
thanks for the answer!
but I do not know programming language
can you help me, please?
Thank you!

Not tested at all, but try this:

  1. Create the template-custom dir:
    mkdir -p /etc/e-smith/templates-custom/etc/openvpn/host-to-net.conf/

  2. Copy the original fragment:

    cp /etc/e-smith/templates/etc/openvpn/host-to-net.conf/40route /etc/e-smith/templates-custom/etc/openvpn/host-to-net.conf/40route

  3. From the copied file, remove lines from 43 to 53.

  4. Apply the config: signal-event nethserver-openvpn-update

3 Likes

Many thanks!
everything is working!

2 Likes