[Solved] Black holing an IPV4 device and app

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 362

PostPosted: Tue Oct 03, 2023 3:01    Post subject: [Solved] Black holing an IPV4 device and app Reply with quote
I have had a device (and accompanying apps) for years and have been preventing them from phoning home with a line like this in Dnsmasq Infrastructure->Additional Options.

address=/undesirable.com/local LAN IPv4 address where I have no device

This works well blackholing all subdomains *.undesirable.com but one of their programs hangs for 10-15s on startup before moving on. I guess it times out after 10-15s waiting for a response from a nonexistent host. How could I make it fail immediately and save 10-15s each time I run that program?

Not a networking guy so please eli5.


Last edited by yoyoma2 on Thu Oct 12, 2023 19:05; edited 2 times in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12795
Location: Netherlands

PostPosted: Tue Oct 03, 2023 7:27    Post subject: Re: Black holing an IPV4 device and app Reply with quote
yoyoma2 wrote:
I have had a device (and accompanying apps) for years and have been preventing them from phoning home with a line like this in Dnsmasq Infrastructure->Additional Options.

address=/undesirable.com/local LAN IPv4 address where I have no device

This works well blackholing all subdomains *.undesirable.com but one of their programs hangs for 10-15s on startup before moving on. I guess it times out after 10-15s waiting for a response from a non-existant host. How could I make it fail immediately and save 10-15s each time I run that program?

Not a networking guy so please eli5.


Either send NXDOMAIN by not specifying anything or send NULL, some application will understand NULL better than NXDOAMIN
Code:
address=/undesirable.com/

Code:
address=/undesirable.com/#


From the MAN page of DNSMASQ:
Quote:
--address=/example.com/ is equivalent to --server=/example.com/ and returns NXDOMAIN
--address=/example.com/# will return NULL addresses for example.com and its subdomains


It is no guarantee that the application will then stop resolving though

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 362

PostPosted: Tue Oct 03, 2023 13:23    Post subject: Reply with quote
I just tried both and the program still has a slow startup as you warned. It's not open source so who knows what it's doing. I'll keep the '#' method since that makes the intention clear. Much cleaner than what I was doing before.

Thanks @egc.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12795
Location: Netherlands

PostPosted: Tue Oct 03, 2023 13:42    Post subject: Reply with quote
As always my pleasure Smile
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum