DNS filtering and password protect

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
oatly93
Level 1
Level 1
Posts: 30
Joined: Mon Feb 15, 2021 3:09 pm

DNS filtering and password protect

Post by oatly93 »

Hi everyone!
I'm wondering something... I've been searching for something to help me fight some addictions, and found this Cleanbrowsing DNS filter.
My question is... The website says I should just run:

sudo echo 'nameserver 185.228.168.168' > /etc/resolv.conf

BUT
how do I keep myself from changing it back? I'd like to password protect it somehow and give that password to a friend, that way I can refrain from changing it back.... Or anything similar.
Ideas?
Thanks!
:)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: DNS filtering and password protect

Post by rene »

That by them provided command is not an over boot persistent method on current Ubuntu/Mint (and most other) distributions since /etc/resolv.conf is in a default setup a mere symlink to a by systemd-resolved generated resolv.conf under /run.

Since there is moreover no, full-proof, way to keep you from changing /etc/resolv.conf as long as you have admin privileges generally, i.e., as long as you can for example install software, rather than fix things up so that their method works you might as well simply set things up regularly through NetworkManager and keep all otherwise standard.

That is; if you go into "Network Configuration" or whatever your edition calls it, also available from rclicking the networking tray icon, and you edit the connection that you are using you can on the "IPv4 Settings" tab instead of the usual "Automatic (DHCP)" method choose "Automatic (DHCP) addresses only" after which a "DNS servers" field becomes available in which you can set their server 185.228.168.168. If you have IPv6 as well and if they also have an IPv6 DNS-server you do the same thing with that server's IPv6 address on the "IPv6 Settings" tab. If you have IPv6 and they don't you'd need to disable IPv6 by setting its method to "Disabled" on that IPv6 tab. If you don't have IPv6 it doesn't matter.

Disconnect and reconnect the networking or reboot after you do. Yes, you can easily set things back but again, as long as you have admin rights nothing would in a full-proof manner keep you from doing that anyway so I'd advise simply relying on character or on https://www.amazon.com/dp/B0953T97GZ
Locked

Return to “Software & Applications”