Hi,
I'm trying to make a DNS filter for some websites. I changed the DNS in /etc/Network-manager/system-connections and it's works but, I'm annoyed because I'm the root of
this computer so, it's easy for me to change this file again, if I want to.
The solution would be to protect the modification of this file with another password, that I can't obtain, even If I'm root. Is there any way to do this?
And, if this isn't possible, is there other solutions?
Thanks for your help!
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
protect modification of file, not reading, with another pass
-
- Posts: 1
- Joined: 2018-09-23 08:26
Re: protect modification of file, not reading, with another
I think it is okay to edit them, but permissions on those files should probably be left the way they are to allow NetworkManager to work the way it is designed.
Instead, what if you made resolv.conf immutable when the connection was activated? see this...
https://wiki.debian.org/resolv.conf
That could be done with a script, in /etc/NetworkManager/dispatcher.d
I don't know why you would want to password protect a file against yourself, and throw away the password, but I guess there might be a way to do it... some kind of encryption maybe?
Instead, what if you made resolv.conf immutable when the connection was activated? see this...
https://wiki.debian.org/resolv.conf
That could be done with a script, in /etc/NetworkManager/dispatcher.d
I don't know why you would want to password protect a file against yourself, and throw away the password, but I guess there might be a way to do it... some kind of encryption maybe?
resigned by AI ChatGPT
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: protect modification of file, not reading, with another
Wouldn't the logical thing be to only do things as root when you need to, andI'm annoyed because I'm the root of
this computer so, it's easy for me to change this file again, if I want to.
normally just work as a normal user.
And then , if and when you NEED to, use su to become root, but also don't go just changing files simply because you want to, only if you NEED to change something. and when you do think you need to change something, make a copy of it before changing it, store the copy in a safe place.
If it is a file you want to "protect", copy it, save on a storage device, or you could even make a directory, and save the copies, special files in it. You could set the permissions in that directory to read only, but if later you want one as reference, you have a good copy.
Use a little logic , it goes a long ways.
"What we expect you have already Done"
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
==========
Old Website
======================
For the Birds
==================
What Does a Parrot Know About PTSD?
Re: protect modification of file, not reading, with another
Maybe if you are "annoyed" by you being able to change the file, then don't give yourself root?
Re: protect modification of file, not reading, with another
i think networkmanager would be able to change it back again, it tends to do that.
but let's take a step back:
you want to black certain domains?
maybe you want a hosts-centric solution?
but let's take a step back:
what exactly do you mean?mahaaaaham wrote:I'm trying to make a DNS filter for some websites.
you want to black certain domains?
maybe you want a hosts-centric solution?