Need cli for raspberry pi running kali

dash-dns
#1

went on numerous sites to download cloudfare
tring to use cloudfare services to run my pihole/dnscrypt on my rasberry pi
its running kali linux
any help will be greatly appreciated

#2

What are you trying to accomplish? Seeing as you refer to pihole and dnsmasq I assume you’re trying to use Cloudflare as your upstream resolver? If so, dnscrypt (which you already have) supports DNS over HTTPS natively so if you’re uptodate you don’t need to download anything - just change some settings in dnsmasq.conf.

Alternatively you can use cloudflared to take care of lookups in which case you’ll download it and set it up to act as a local proxy of sorts… dnsmasq will then be configured to use localhost: as the upstream resolver and you’ll have cloudflared listen for requests from dnsmasq and pass them on to Cloudflare for resolution.

Take a look at this:

and you can get Cloudflared from here:

3 Likes
#3

Trying to connect to cloudfare for one. Used 1.1.1.1/help. My goal is to use dns over http what u sent above is useful information. I’ve read how to utilize Pi-Hole/dnscrypt and open vpn. My goal for now is to connect to cloudfare dns which I accomplished on my windows computer I would like to do it as my raspberry pi that’s running kali Linux. I’m new to using Linux but have some basic knowledge I’m learning as I go. Thanks for the reply and if u having any further info it would greatly be appreciated

#4

I’m going to use Cloudflared, how do I download it as a command line or do I need to open a browser and download. Also which is the appropriate type and and64 x86 armv6

#5

rPi would use the ARM version I think. If you’re running Kali then that’s based on Debian so you can download the .deb package from the second link in my original and install it via dpkg.

#6

ok great so what command would i need to implement to download it if im logged into the pi via ssh

#7

use wget or curl to download then dpkg -i .deb

2 Likes
#8

Ok so as example for that specific file what would the command be. Learning as I go I know the basics but don’t know how to coincide it to download files.

#9

wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.deb
dpkg -i cloudflared-stable-linux-arm.deb

#10

[email protected]:~# wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linu x-arm.deb
–2019-04-30 09:11:41-- https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable- linux-arm.deb
Resolving bin.equinox.io (bin.equinox.io)… failed: Temporary failure in name r esolution.
wget: unable to resolve host address ‘bin.equinox.io

#11

You will have to set your DNS server to something else before you install it.

#12

[email protected]:~# wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.deb
–2019-04-30 10:58:55-- https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.deb
Resolving bin.equinox.io (bin.equinox.io)… 52.45.248.161, 52.2.175.150, 34.206.253.53, …
Connecting to bin.equinox.io (bin.equinox.io)|52.45.248.161|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 10506634 (10M) [application/octet-stream]
Saving to: ‘cloudflared-stable-linux-arm.deb.1’

cloudflared-stable-lin 100%[===========================>] 10.02M 11.6MB/s in 0.9s

2019-04-30 10:58:56 (11.6 MB/s) - ‘cloudflared-stable-linux-arm.deb.1’ saved [10506634/10506634]

[email protected]:~# dpkg -i cloudflared-stable-linux-arm.deb
dpkg: error processing archive cloudflared-stable-linux-arm.deb (–install):
package architecture (arm) does not match system (armhf)
Errors were encountered while processing:
cloudflared-stable-linux-arm.deb

#13

So cloudflared might not work because of the different CPU architecture. That being said you should be able to force it with

dpkg --force-architecture -i cloudflared-stable-linux-arm.deb

but I have no clue how well it will work.

#14

INFO[0000] Adding DNS upstream url=“https://1.1.1.1/dns-query
INFO[0000] Adding DNS upstream url=“https://1.0.0.1/dns-query
INFO[0000] Starting metrics server addr=“127.0.0.1:33961”
INFO[0000] Starting DNS over HTTPS proxy server addr=“dns://localhost:53”
ERRO[0000] Failed to start the listeners error=“failed to create a UDP listener: listen udp 127.0.0.1:53: bind: address already in use”

i use pihole im assuming it uses port 53? any suggestions.

#15

Use 5353 and then point your pihole to use 5353 to resolve addresses.

#16

How do I configure cloudfare to use 5353 and I’m assuming u mean change pihole to use port 5353 as well? Again sorry for the questions. Most of what u wrote I understood along the way and made notes.

#17

Here is a good walk through of what you want to do.

#18

Perfect this is what I’ve been looking for thanks so much for the assistance

#19

did everything and got DOH to work but now with configuration with dsnmasq i get this error.

dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled; vendor preset:
Active: failed (Result: exit-code) since Thu 2019-05-02 10:23:15 AEST; 22s ag
Process: 794 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCC
Process: 795 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2

May 02 10:23:15 kali-pi systemd[1]: Starting dnsmasq - A lightweight DHCP and ca
May 02 10:23:15 kali-pi dnsmasq[794]: dnsmasq: syntax check OK.
May 02 10:23:15 kali-pi dnsmasq[795]: dnsmasq: failed to create listening socket
May 02 10:23:15 kali-pi dnsmasq[795]: failed to create listening socket for port
May 02 10:23:15 kali-pi dnsmasq[795]: FAILED to start up
May 02 10:23:15 kali-pi systemd[1]: dnsmasq.service: Control process exited, cod
May 02 10:23:15 kali-pi systemd[1]: dnsmasq.service: Failed with result 'exit-co
May 02 10:23:15 kali-pi systemd[1]: Failed to start dnsmasq - A lightweight DHCP

#20

Port is probably in use. Ask on the dnsmasq forums as this isn’t a Cloudflare issue really.