cleanbrowsing/dnsperftest

Does not seem to work with zsh running on OSX

nodesocket opened this issue · 13 comments

iMac ➜  Desktop ./dnstest.sh
               test1   test2   test3   test4   test5   test6   test7   test8   test9   test10  Average
cloudflare      ms     expr: syntax error

Try to run it as:

sh ./dnstest.sh

To force the "sh" shell instead of zsh. It seems to be missing the expr command on zsh.

it's not the expr that's failing, it's the dig.

Trying to dig www.google.com @1.1.1.1 results in:

; <<>> DiG 9.8.3-P1 <<>> www.google.com @1.1.1.1
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

I believe in my case this may be due to my company's firewall blocking external DNS, but I've not verified this yet

Yeah I just verified that my company is blocking external DNS traffic (and the same command works when I hard-code my local DNS), I'll try the tool out when I get home and verify that it works on zsh

@dgirgenti the dig command is working fine. I believe it is the expr command on zsh.

so dig www.google.com @1.1.1.1 works fine for you? for me the expr works fine when given a valid result from dig which is failing for me

Yea I'm seeing the same issue as @dgirgenti

$ dig google.com @1.1.1.1
; <<>> DiG 9.8.3-P1 <<>> google.com @1.1.1.1
;; global options: +cmd
;; connection timed out; no servers could be reached

Stange this works on my MacBook Pro running zsh, but not on my iMac running zsh.

What version of dig are you running? On my MacBook Pro I am running:

MacBook-Pro ➜  ~ dig -v
DiG 9.10.6

I'm on macOS 10.12.6 and dig is 9.8.3-P1. Are either of those machines on high sierra?

I think I figured out the issue, it seems my home ISP (AT&T fiber) is blocking the dig request for some strange reason even though I am using 1.1.1.1 successfully at home.

From my office:

MacBook-Pro ➜  ~ dig google.com @1.1.1.1

; <<>> DiG 9.10.6 <<>> google.com @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50804
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1536
;; QUESTION SECTION:
;google.com.			IN	A

;; ANSWER SECTION:
google.com.		39	IN	A	172.217.0.78

;; Query time: 4 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Mon Apr 02 14:39:35 CDT 2018
;; MSG SIZE  rcvd: 55

VPNing into my home:

MacBook-Pro ➜  ~ dig google.com @1.1.1.1

; <<>> DiG 9.10.6 <<>> google.com @1.1.1.1
;; global options: +cmd
;; connection timed out; no servers could be reached

Looks like some ISPs are having problems with 1.1.1.1. You can change that line in the script to 1.0.0.1 (the alternate ip for Cloudflare) and it may work.

Yes, 1.1.1.1 is not accessible from a bunch of locations due to mis-configured ISPs and routers.

Unfortunately, many people can't use it right now.

Works fine for me on macOS 10.13.4 and zsh 5.3.

Works correctly for me on macOs 10.13.3 and zsh 5.3