I would like to disable the warp-cli like it is done in the GUI app. After running warp-cli disconnect
I am getting website’s DNS not found error. I hope somebody can help me.
Thank you.
May I ask which mode you’re using?
Anything in the logs helpful maybe?
This is a bug. Ive reported it. It also applies to Mint Cinnamon 21 (its what Im using)
The DNS resolver is changed by the warp-cli on the connect command to the local DNS of 127.0.2.2 and 127.0.2.3
This can be seen looking at the file via… sudo nano /etc/resolv.conf
After doing a warp-cli disconnect, you’ll notice one can ping some IP (such as 8.8.8.8) but no resolving.
Edit the resolv.conf manually to use the original warp IPs of 1.1.1.1 and 1.0.0.1 or those of ones own favourite DNS provider
edit - I should mention, this behaviour of changing the DNS is also done via the Windows client (which is nice). It also changes the DNS to/from automatically… as one would expect. This can be seen by running ipconfig /all in a prompt… both while client is on, and then off. You’ll see it change - as it should in the Linux version.
NEWS!
If one edits the /etc/resolv.conf to add in the lines you wish to have (i.e. what your original DNS config was) then the commands for connect/disconnect work properly.
The file reverts back to our post-install-edited-file. The warp-cli perhaps is looking for the strings in the resolv.conf… when they are not present on the very first use of register and connect it casually blows away the existing config.
This behaviour changes after manually editing the file.
Be nice to have the desktop client click for on/off…
STILL A BUG!
More news and a better answer after learning more about how this shenanigans actually works…
After running
warp-cli disconnect
, the warp service does NOT hand over the DNS properly.
The nature of the new(-ish) systemd-resolved.service is that any process that hijacks the DNS for the purpose of VPN-ing should subequently reset itself back to the previous or default settings.
The warp-cli doesn’t do this, hence the buggered DNS.
This can be quickly reset via the terminal, using
service systemd-resolved restart
The system will burp a bit, then all should be good.
Ive created two desktop shortcuts, one to turn the service on, the other off. I shall write this up and post here.
There is also this project here: GitHub - mrmoein/warp-cloudflare-gui: a GUI app base on warp-cli for linux
INTRODUCTION
The Linux tool for Cloudflare WARP does not have a management interface akin to the Windows version.
This non-GUIness explained, quite reasonably, in this blog post here: https://blog.cloudflare.com/announcing-warp-for-linux-and-proxy-mode/
It is a good compromise. Get as many installs as possible and worry about the sexy details later.
On my Mint Cinnamon, I had a few issues I needed to overcome. I thought to share in case others might find it useful.
THE PROBLEM
OK - this is to those:
– who DON’T want to control their setups via the terminal (understandable) and
– are experiencing the BUG where the DNS doesn’t RESOLVE after turning WARP OFF
– have installed the WARP client correctly, it works, and one sees the cloud icon in their lower system panel
ABOUT MY SETUP
My setup is Linux Mint Cinnamon 21 with the WARP CLI installed (instructions are in the links of the article above).
I am NOT a Linux systems expert. Simply someone who enjoys the frustration of fixing trivial problems Experts, please accept all my errors, omissions, oversights and horrible ignorance, and feel free to freely correct anything.
Attached is a screenshot showing my solution (‘WARPdesktopScreenshot.png’)
'INSTILLATION"
Once one has installed WARP, done the ‘warp-cli register’ and ‘warp-cli connect’ thing, there is a directory here ‘/home/USER/.local/share/warp’ that contains the file ‘accepted-tos.txt’.
I’ve made up SIX files to be put there. It seemed like a logical/reasonable place (this isn’t a stand alone project).
The files are:
– warp.off.png
– warp.on.png
– warp.on.sh
– warp.off.sh
– WARP On.desktop
– WARP Off.desktop
The idea is:
– The shell files fire off the needed commands to both start and stop the warp-cli properly. They also “fix” the DNS problem that using the disconnect command causes.
– There is a desktop icon to simply hit for on/off
– There is an ico file to make each icon look nice.
Doings:
– Unzip the GIT below into ‘/home/USER/.local/share/warp’ (or anywhere)
– modify the *.sh files to be executable… ‘sudo chmod +x warp.off.sh warp.on.sh’
– Drag the two .desktop files onto the desktop
– EDIT the TWO .desktop files to add your machines USERNAME instead on mine (‘msi’)
e.g.
Exec=/home/msi/.local/share/warp/warp.off.sh
Icon=/home/msi/.local/share/warp/warp.off.png
Replace ‘msi’ part with your login name (‘RumpleStiltskin’ or whatever)
TEST by tapping the icons. The Cloudflare connection icon in thy taskbar should now turn on and off appropriately, plus you’ll have internet.
THE FILES - GIT
I’ve put them onto GIT for the world: GitHub - AtomicRobotMan0101/WARP-cloudflare-desktop-shortcuts: A set of shortcuts and icons to make controlling the Linux WARP install more GUI-ish
I’m a fairly frequent user of GIT, but no expert. I intend plugging in “more smarts” into the scripts and scripting a few interesting events… especially using the captured session and DNS lookup data and making a widget.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.