umaxim
asked on
php cidr
Hi i need to get 2500 CIDR of websites. How i can do it with php ?
ASKER
yes
ASKER
I try to use who.is to get this information because one of my client want to block all online proxy so he ask me ban it by ip i desiced to ban it by cidr.
whois is definitely not the proper tool for various reasons
- the information it provides is never up to date
- it is very likely that thousands of sites will correspond the the same whois entry
if you have a list of websites, you probably can simply perform a DNS lookup and insert each ip of each site as a /32 in the list
if you are using a firewall, it is very likely that the firewall can accept fqdn names and perform the lookup by itself
what is your original list ?
what tool are you using to block traffic ?
- the information it provides is never up to date
- it is very likely that thousands of sites will correspond the the same whois entry
if you have a list of websites, you probably can simply perform a DNS lookup and insert each ip of each site as a /32 in the list
if you are using a firewall, it is very likely that the firewall can accept fqdn names and perform the lookup by itself
what is your original list ?
what tool are you using to block traffic ?
ASKER
i use iptables to block the original list is list of websites and their ip
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
so i can block by websites too for example -d www.abc.com --dport 80 and it will block it
yes : this is the simple straightforward solution providing you have the list of sites you need to block.
the firewall should be intelligent enough not to perform dns queries too often, and intelligent enough too reperform them periodically in case the ips change.
actually i cannot confirm netfilter performs the queries when needed, but most firewalls do.
the firewall should be intelligent enough not to perform dns queries too often, and intelligent enough too reperform them periodically in case the ips change.
actually i cannot confirm netfilter performs the queries when needed, but most firewalls do.
http://rfc-ref.org/RFC-TEXTS/1518/longList.html
If so, please tell us why you need this information and show us what you have tried to use to get it, thanks.