Community discussions

MikroTik App
 
3liswaid
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Thu Feb 14, 2019 5:12 pm
Location: Syria
Contact:

Script to capture Whatsapp IPs

Sun Feb 09, 2020 1:55 pm

Hi,
I am using this address to capture Whatsapp IPs, but sometimes it captures 0.0.0.0 and add it to the list
do you have any solution?
# Use DNS Entrys and add Address to the Firewall Address-list #
:foreach i in=[/ip dns cache all find where (name~"whatsapp") && (type="A") && (data!=0.0.0.0) ] do={
 :local tmpAddress [/ip dns cache get $i address];
delay delay-time=10ms
# prevent script from using all cpu time #
 :if ( [/ip firewall address-list find where address=$tmpAddress] = "") do={ 
 :local cacheName [/ip dns cache get $i name] ;
 :log info ("added entry: $cacheName $tmpAddress");
 /ip firewall address-list add address=$tmpAddress list=Whatsapp comment=$cacheName;
}
}
 
User avatar
inteq
Member
Member
Posts: 412
Joined: Wed Feb 25, 2015 8:15 pm
Location: Romania

Re: Script to capture Whatsapp IPs

Sun Feb 09, 2020 3:40 pm

Do you have some sort of pi-hole on your network?
Data=0.0.0.0 looks like a pi-hole blocking access to that domain. (if type != unknown)
 
3liswaid
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Thu Feb 14, 2019 5:12 pm
Location: Syria
Contact:

Re: Script to capture Whatsapp IPs

Sun Feb 09, 2020 7:44 pm

Do you have some sort of pi-hole on your network?
Data=0.0.0.0 looks like a pi-hole blocking access to that domain. (if type != unknown)
yes i do have a pi-hole
but even without using pi-hole
MikroTik still adding 0.0.0.0 to address list under the name of whatsapp


P.S=i am making the mikrotik is the main DNS server for Pi-hole
and Pi-hole is the main DNS server for all other devices (mobiles-laptops)
 
neutronlaser
Member
Member
Posts: 445
Joined: Thu Jan 18, 2018 5:18 pm

Re: Script to capture Whatsapp IPs

Sun Sep 27, 2020 1:49 am

Pi hole breaks nature of internet

Who is online

Users browsing this forum: No registered users and 43 guests