Link to home
Start Free TrialLog in
Avatar of umaxim
umaximFlag for United States of America

asked on

php cidr

Hi i need to get 2500 CIDR of websites. How i can do it with php ?
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Are you talking about the RFC?
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.
Avatar of umaxim

ASKER

yes
Avatar of umaxim

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.
Avatar of skullnobrains
skullnobrains

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 ?
Avatar of umaxim

ASKER

i use iptables to block the original list is list of websites and their ip
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of umaxim

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.