HELP! /etc/resolv.conf messed up [DNS]

Its not a surprice that i got myself in trouble, AGAIN!

So heres the thing. everything was going fine, I was browing, using anonsurf, all good. Suddenly Pc crashed and brought me to the login screen. Thats weird. Fine. I put my password and logged in back, all browsing windows were closed as if i just started the PC, a fresh new session. My internet was still connected

However, turns out, some new issue popped up with my DNS. Whenever i connect to anonsurf, my network works fine. However, As soon as i disconnect anonsurf and browse clearnet, the error “err_name_resolution_failed” and i did a bit of digging myself. People have had same problem with anonsurf before and this is the first time it happened to me. Heres a snap of my /etc/resolv.conf

following snap is result of “sudo pluma /etc/resolv.conf”

dns1

Im not clear what exact issue is and how to get out of it. I tried putting other dns myself using a text editor as root but it still wont let me change the resolv.conf file despite running as root.

Here are the permissions of the file :

I tried connecting downloading some tiny packages like cowsay and aafire though repo just to check if its working and the error terminal gave me was similar one “temporary unavailable…”

Basically, My internet is ONLY working with anonsurf and thats not reliable since it could be really slow at times and i cannot download huge files since it would slow down the tor network itself. And i do not indent to any harm to Tor network nor my Pc.

Help me out please :frowning:

Try to add DNS
1.1.1.1
8.8.8.8 instead of Locah host & lhost

Sounds obvious but have you tried turning anonsurf off?

Well, only if it was that easy. you see. @Amzker
I clearly mentioned i tried to change cloudflares privacy dns 1.1.1.1 and 1.0.0.1 but it wont let me edit the file even tho i was as root. Thats weird. Which is why i came asking for help here.

Coming to you @muroga,

Yes. I tried all of this before trying to reach out to the community. I rebooted my network, rebooted my device, tried to change dns but it wont let me even as root. Heck resolv.conf wont even let me change the file permissions even as root. And all this time i thought being root could make modifying files in linux easy. Perhaps i was wrong. At least this time.

Error : You do not have permissions to modify this file.

dns3

dns4

dns1

:slightly_frowning_face:

me%20irl

P.S whats up with that arrow

resolv.conf.bak -> /etc/resolvconf/run/resolv.conf. could that be causing an issue?

Maybe You done something wrong. , i don’t think so that in root it not allow to write ,

Maybe it is mounted as RO
login in normal user and then do via sudo

That is linked file ,

It’s look like you login as root isn’t it?
Well in DNS try to add Parrot DNS , you can get from that anonsurf script

Is indeed mounted as read only and im unable to change the permissions! Thats the issue! It simply won’t let me edit the nameserver. I usually use 1.1.1.1 and 1.0.0.1 (cloudflare DNS) but I’m unable to access Internet without Anonsurf.

As you said login as normal user and then try as root, that didn’t work. I’ve tried that before reaching out to the community and so far i don’t see any hopes

This is a terrible terrible issue :frowning:

Im wondering the same thing since yesterday! I’ve tried literally hundreds times to modify permissions of /etc/resolv.conf as root so that i can get back my clearnet working but it won’t let me. I’m definitely doing something wrong here & idk what it is.

Maybe @KidKlown you can look into this issue and find a solution out :frowning:

Thank You For Your time!

@RedRuby Here, this will work. i had the same issue a month ago and this resolved it. Hope it helps

https://parrotsec.org/blog/no-internet-connection-when-upgrading-to-parrot-3-7/

PS: even if you succeeded into changing the perms on the file, they would have been undone by the system anyway. Trust me, i’ve tried

To get it back to what it would have been as default try

sudo rm /etc/resolv.conf
sudo ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
sudo service network-manager restart
1 Like

I’ll keep that in mind :slight_smile:

Outcome : ----i---------e---- resolv.conf

See this is the thing. Despite of running as sudo i get an error "operation not permitted.

@KidKlown Heres the verbose :

┌─[root@parrot]─[/]
└──╼ #rm /etc/resolv.conf
rm: cannot remove ‘/etc/resolv.conf’: Operation not permitted

==========================================

@Goldy_Fazbender Thanks for dropping that link but unfortunately it didnt work either. “operation not permitted”

Heres the error i keep getting when i try to modify file or file permissions.

┌─[root@parrot]─[/]
└──╼ #rm /etc/resolv.conf
rm: cannot remove ‘/etc/resolv.conf’: Operation not permitted

┌─[root@parrot]─[/]
└──╼ #pluma /etc/resolv.conf

it wont let me update the file.
“Operation not permitted”

==============================================

And @s1udge

Yes and none of them worked :frowning: thats super unfortunate. I even looked into ubuntu forums and linux forums but nothing helped.

==========================================

Appreciate you all helping me but none of it worked soo far :frowning: and my system is practically unusable since Anonsurf isnt reliable for daily usage with regards to speed, compactibility and comfort. Most sites need cloudflare authentication and many wont even allow me in the site since the traffic is comming via Onion network.

This is an awfull situation :worried:

Yes its because the immutable bit has been set somehow. Do what sudge suggests above, it will solve the issue.

1 Like

sudo anonsurf stop. Have you tried it?

Yes. Trust me ive tried everything

Sorry because my question sounds stupid. Because I saw your backup config was there so technically sudo anonsurf stop should recovery your network data and options after the crash. But if you turn anonsurf on again before turn it of, it makes the error. Is your network connection still having error? Or It was fixed while i was typing this

Thats the thing. It didnt. Thanks to @KidKlown my network is back up and working

You should reboot your system and check your config file again. Make sure it won’t be replaced after reboot.

Ive been having that issue for now 3 days @dmknght. Ive tried rebooting network rebooting device starting and stoping services trying to do stuff via normal user as well as root, treid to edit resolv.conf but nothing had worked but now my network is back and working thanks to Matt as well as @s1udge :smiley:

Cheers!

1 Like

I would be thanking @sudge, he discovered the problem. But at least were are back up and running.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.