anteon icon indicating copy to clipboard operation
anteon copied to clipboard

DNS doesn't resolve correctly when using local domains

Open geNAZt opened this issue 2 years ago ā€¢ 1 comments

Hi,

i have setup a custom domain (*.ldev) to show on my own network. This is done via resolver config on a mac os 12 device. The problem now is that ddosify doesn't try the local DNS resolver at all and directly tries to resolve the domain given via the parent DNS resolver (which is my router):

 ./ddosify -t https://symfony-test.ldev/lucky/number                                                            
āš™ļø  Initializing...
šŸ”„ Engine fired.

šŸ›‘ CTRL+C to gracefully stop.
āœ”ļø  Successful Run: 0        0%       āŒ Failed Run: 14     100%       ā±ļø  Avg. Duration: 0.00000s
^Cāœ”ļø  Successful Run: 0        0%       āŒ Failed Run: 22     100%       ā±ļø  Avg. Duration: 0.00000s


RESULT
-------------------------------------
Success Count:    0     (0%)
Failed Count:     22    (100%)

Durations (Avg):

Error Distribution (Count:Reason):
  22     :dial tcp: lookup symfony-test.ldev on 192.168.0.1:53: no such host

I would expect that ddosify can resolve the domain like all other tools like ping can:

ping symfony-test.ldev                                                                                                         
PING symfony-test.ldev (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.068 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.236 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.151 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.125 ms

Thanks :)

geNAZt avatar Feb 27 '22 10:02 geNAZt

Hi @geNAZt, thanks for the issue :)

I reproduced the issue with the brew dnsmasq package. Since the ddosify is built on a different server, golang http package does not resolve your private dns server's domains. As a workaround, you can build ddosify on your machine:

cd /tmp
git clone https://github.com/ddosify/ddosify.git
go build -o ddosify
./ddosify -t https://symfony-test.ldev/lucky/number

I will look for other solutions to avoid this issue with the pre-compiled ddosify binary.

fatihbaltaci avatar Feb 27 '22 17:02 fatihbaltaci