Persistent sysctl.conf modifications

where are you saving upgrade-persistent sysctl.conf modifications?

I am doing someting like:

ln -s /config/scripts/sysctl-user.conf /etc/sysctl.d/sysctl-user.conf

Any better idea?

Hello @billytheczech ,

I just want to notice, this feature available under CLI option:
set system sysctl custom <some_sysctl_opt> value <value>

1 Like

This is one of those features that when I found, made me love Vyos just a little bit more :slight_smile:


This is exactly the syntax I use in my Config. However, I have the peculiarity that I only want to adjust a sysctl parameter for a specific interface that does not yet exist at boot time, but is only created by the Config. In detail, it is about a GRE tunnel interface.

The sysctl key is set by:

set system sysctl custom net.ipv4.conf.tun1.accept_local value '1'

After a reboot of the router, the value is still 0. I have checked this with

sudo sysctl net.ipv4.conf.tun1.accept_local

The only workaround that works for me is to enter this in the file /config/scripts/vyos-postconfig-bootup.script

/sbin/sysctl -w net.ipv4.conf.tun1.accept_local="1"

Is there another way to solve the problem? The VyOS version is 1.3.

I don’t think there is, no.
This is potentially something you could submit as a feature request.
Though it’s a hard one, some variables are better set before interfaces etc are bought up.

I think your solution is probably the best for the moment.

In any case I created a task for it T3714