AnonSurf not resetting to original

@g0rbe

When Anonsurf is stopped it doesn’t restore previous Parrot settings. Right now I get errors when not connected such as Name or service not known via terminal.

I need to restore everything back before running anonsurf for the first time. Did the dns settings get changed? What else could have changed and how to restore everything back?

Thank you!

And I also don’t have internet connection unless I’m running anonsurf. I think also some changes happened with IPV6 settings that were never restored.

Like iptables and ipv6 ?

Yes, anonsurf change it to 127.0.0.1 , 139.99.96.146 , 37.59.40.15 , 185.121.177.177

Iptables, restore:

iptables -F
iptables -t nat -F

resolv.conf, restore:

rm /etc/resolv.conf
mv /etc/resolv.conf.bak /etc/resolv.conf

disable ipv6, restore:

sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0

If you can start anonsurf without error, i cant understand what you did to fail the stop.
If you have furher problem, please send me a screenshot of the anonsurf start and anonsurf stop

@g0rbe

Thanks for your reply!

I did the steps as instructed.
I’m still experiencing the issue. I looked at the resolv.conf file, it seems that the IPV6 address there is incomplete.

I have compared with another computer with Parrot where I never ran anonsurf I see a more complete address in the resolv.conf file.

I’m got internet now after I restarted the computer, but it behaves weird. When I’m connected to a network that uses a proxy, it fails to work. I can’t even ping. ping: www.google.com: Temporary failure in name resolution.

There seems to be other things that were modified and not restored.

When running anonsurf stop, I didn’t see issues in the log.

Is there a way to restore all settings as if I installed Parrot for the first time? I have ran into the same issue before and was only resolved after reinstalling the OS. I really don’t won’t to do that because I have already installed many applications, Nvidia driver, etc…

ipv6 ??

What did you do with your resolv.conf ?
The anonsurf script impossible to add /try to add ipv6 nameserver to it.

Restore:

sudo iptables -F
sudo iptables -t nat -F
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
dpkg-reconfigure resolvconf

then reboot

Is this okay?

└──╼ $sudo resolvconf -u
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf

This is a directory.

└──╼ $ls -F | grep “resolv”
resolvconf/
resolv.conf@
resolv.conf.head

my fault, sorry, i am just just copied from the ( i am at work )

do this:

dpkg-reconfigure resolvconf

this will work (tested) :slight_smile:

3 Likes

Thank you so much I think we are narrowing down on the issue.

This gave me is not a symbolic link to /etc/resolvconf/run/resolv.conf
I rebooted but it didn’t work.

I went into another laptop and copied from there the resolv.conf info.
I create a new resolv.conf file
I added the domain address
also the two nameserver address

Cheers, I got internet in the network with the proxy where I had issues. I was able to connect and browser any website. I was also able to ping.

Now, the issue is when I switched to an external open network, I have no connection. Therefore DNS configuration don’t automatically update correctly when i switched networks.

I will try this dpkg-reconfigure resolvconf and reboot and let you know.

Thank you!

1 Like

Thank you so much that solved the issue. I can switch between networks and all connections work fine. You have no idea how happy I’m.

1 Like

I was having the same issue as ConnectionistSystems and this also worked for me, thanks!

Yes, @g0rbe did an awesome job to help me fix my problem.:smiley:

I have the exact same problem with you guys here when i stopped anonsurf, and this helped me… i can’t thank you enough :blush:

1 Like

Hi @ all,

I’m sorry but I’m new to Parrot and I run in the same issue like the other guys. If I stop Anonsurf by ‘anonsurf stop’ a damaged resolv.conf remains on the system. Copying the .bak-file or using dpkg-reconfigure solves the problem, but shouldn’t the script work without this ‘tricks’? Just start anonsurf, browse the web, stop anonsurf and continue surfing?

regards

What does “cat /etc/resolv.conf” give you? I think you can type in “anonsurf dns” to turn it on/off.

Hi.

I’ve got an error that the file doesn’t exist. Thats why I copied the backupfile.
Meanwhile I found out that my update of the system caused the problem. A fresh unpatched installation didn’t show the failure.

###ISSUE RESOLVED WITH THIS CMD SET### I started anon-surf and when I stopped the service the resolver stopped working. Entered just the commands in this section of the forum and ISSUE RESOLVED, after trying a-lot of networking tricks and workarounds. I know that this was the only thing that needs to be done bc I had a snapshot that I created the second the problem had occurred. Ran cmd set and fixed.

Happened for me also but I just click SET/UNSET OpenNIC DNS Service, the last tab under Anon Surf and it corrects it.

It can be done with both Desktop Launcher and sudo anonsurf dns command.

P/s: There is a new anonsurf version which is still under development. Please help us check if the bug is still in it so we can complete it asap
nest.parrot.sh/packages/tools/anonsurf
Changelog:

  • Add a GUI. It was written by Nim language and gintro which is a gtk library of Nim lang
  • Set anonsurf as system unit. User now can enable anonsurf on boot. It also fix the issue Lose DNS settings if user forgets to turn anonsurf off before shutdown / reboot
  • Use nyx to show current anonsurf status.

Known issues:

  • There is a small delay after anonsurf turns Tor on. The nyx disappears right after user clicks on status button. When Tor is completely turned on, the nyx works fine.
  • The change ID function doesn’t seem right. We are researching for other way to make the change ID work without restarting tor service.

How to build:

  1. Prepare environment. It needs to run 1 time only
  • Install nim: sudo apt install nim
  • Install gintro: nimble install gintro
  1. Install package
  • Clone the project and run sudo make install
    OR if you know how to use Debian devscript:
  • debuild -us -uc -b to make a new package then use sudo dpkg -i to install it.

Any trouble during install the package will be marked as installation bug
Trouble while running package will be marked as package bug.
And we will fix both.

1 Like

link to the original reply, replied to [ParaX0rmal] by RedRuby
Jessica

Anonsurf or proxychains changes the resolv.conf file config to 127.0.0.1 aka local host to route through tor.

This should do it for you to stop anonsurf :
sudo anonsurf stop

Once done.

Try to add these in your /etc/resolv.conf file as superuser.

sudo pluma /etc/resolv.conf

trying adding the following lines in the text file

nameserver 1.1.1.1
nameserver 1.0.0.1

Thats cloudflares privacy DNS.

Alternatives are

OpenDNS :

nameserver 208.67.222.222 
nameserver 208.67.220.220

GoogleDNS :

nameserver 8.8.8.8
nameserver 8.8.4.4

Comodo Secure DNS (blocks known malicious sites network wide for free, The one which I prefer for regular use)

nameserver 8.26.56.26
nameserver 8.20.247.20

Finally the /etc/resolv.conf file should look something like this :

conf

Once changed the value of the file. save it and exit.

Finally an other user who actually read the solution instead of set the nick name “hacker” and ask the same question which was answered above :relieved: thank you a lot

1 Like