OpenVPN server.conf: modifications can be overwritten

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
rseiler
Posts: 208
Joined: Sun Dec 15, 2013 12:31 am

OpenVPN server.conf: modifications can be overwritten

Post by rseiler »

Is it intended that manual additions to /etc/openvpn/server.conf will be deleted when clicking Save Changes on the OpenVPN page?

It may happen in some other scenarios, too, I'm not sure yet.

If it is intended, is there any way around it? That's not the kind of file where you'd necessarily want this to happen. Sure, you want the changes saved, but if there are pre-existing things in the file that are unrelated to what's being saved (which is the case), shouldn't they be retained?

Something like this, for example, will go:
push "dhcp-option DNS 192.168.1.100"
Thanks

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: OpenVPN server.conf: modifications can be overwritten

Post by Lantis »

"Designed"... no.
Is that the way it works? Yes.

If you're manually editing files, there is always a risk that the GUI will undo what you have done.


How do we determine whats "unrelated" and whats not? The GUI is just trying to create a config for the user that is guaranteed to work.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

rseiler
Posts: 208
Joined: Sun Dec 15, 2013 12:31 am

Re: OpenVPN server.conf: modifications can be overwritten

Post by rseiler »

I'm not sure, short of it saving just the changes instead of what it seems to be doing, which is starting over with it.

Is a secondary conf possible, one that would chain to the main one? That would solve it, since additions could be kept there.

Deach
Posts: 1
Joined: Fri Mar 20, 2020 2:01 pm

Re: OpenVPN server.conf: modifications can be overwritten

Post by Deach »

I know this is an old thread, but there’s also an issue with /etc/config/networks reverting the vlan numbers.
Example:
I need the wan tagged on vlan 35 for my internet provider.
It’s all set and working by manually editing the network file.
Then, I do something like change the “force clients to use router dns servers” and as soon as I hit save, the network file reverts to option ifname ‘eth0,2’ on the config interface ‘wan’ section.
Of course, all internet drops and there’s loud shouts from all over the house until I can ssh in to fix it.

There’s other GUI sections that cause this as well but I don’t remember what they are as I was busy getting vlan running properly.

Can the GUI only change what’s needed and not mess with custom settings?

Not sure why vlans aren’t part of the GUI by now anyway. It’s really getting more common. Canada’s largest dsl provider requires it and the router they provide is junk.

Post Reply