How to make /etc/sysconfig/network/route-eth0 static


I have a nethsever on my VMWare ESXI with OVH failover IP. Because of the infrastructure of OVH an static route is required. How can i make the above file stick in the filesystem?



Just create all needed routes from the “Static route page”

Thanx Giacomo, i will try!

I’ve tried it but it is giving me a lot of trouble. The problem is that the moment i change anything in the static route, the whole machine becomes unreachable.

The static route has to be: (route-eth0) dev eth0
default via dev eth0

Is there any other way to get this working?

Do you have a link to OVH documentation?
I may have a custom template to add support for this kind of setup.

1 Like

Hi @filippo_carletti,

The link to the OVH documentation BridgeCLient

Thanks in advance.

You need to create an action and link it to the static-routes-save event.
Here’s an example (adjust GATEWAY_VM and/or ethX) of what to write in /etc/e-smith/events/actions/ovh-route



cat <<EOF >>/etc/sysconfig/network-scripts/route-eth0
$GATEWAY_VM dev eth0
default via $GATEWAY_VM dev eth0

Then link the action:
ln -sf ../actions/ovh-route /etc/e-smith/events/static-routes-save/S33ovh-route

If someone has an idea on how to integrate this “strange” setup in the default NethServer configuration, I’ll try to create a patch.


Thank u very much! It’s working like a charm.