You are here

README.txt in IP Ranges 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 7 README.txt
README.txt
==========

IP Ranges is a module that let's you completely ban both single IP-addresses as well as full ranges from your site. The ban is triggered already at the bootstrap phase, so youcan get rid of unwanted visitors as early as possible without wasting server resources.

You can also define whitelists that override blacklists, both single and ranged.
The UI is similar to core ip-ban, so you will feel like home immediately.


INSTALLATION
=============

Just enable the module as usual.


USAGE
============
After enabling the module, go to admin/config/people/ip-ranges to find form with three elements: 
"IP range start / Single IP-address"
"IP range end"
"List type"

Two first two fields take an IP-Address in the form of "100.100.100.100". If the second field is filled, 
they be treated as a range. If you leave it empty, the value from the first field is only used.
(This is currently the only allowed range form, other types like bitmasks may come at later stage).

Type can be either "blacklist" or "whitelist",
where blacklisted IP's are denied from the site, and whitelisted are allowed.
Whitelists always override blacklists.


DEVELOPERS
============

While there is no exactly "API" available, there are some functions you can use in your code if needed:

To ban IP-Address / -Range:

ip_ranges_write_record($ip, $type, $bid='');

Where both ip and type are entered just like from the ui. $bid, or ban id, is optional and can be used to update existing record.

To retrieve list of ban records:

ip_ranges_get_ip_list($type='');

Again, type is either "blacklist", "whitelist" or empty. Return will be array of IP's of requested type. 
Ranges will be like this: "100.100.100.100-100.100.100.200".

File

README.txt
View source
  1. README.txt
  2. ==========
  3. IP Ranges is a module that let's you completely ban both single IP-addresses as well as full ranges from your site. The ban is triggered already at the bootstrap phase, so youcan get rid of unwanted visitors as early as possible without wasting server resources.
  4. You can also define whitelists that override blacklists, both single and ranged.
  5. The UI is similar to core ip-ban, so you will feel like home immediately.
  6. INSTALLATION
  7. =============
  8. Just enable the module as usual.
  9. USAGE
  10. ============
  11. After enabling the module, go to admin/config/people/ip-ranges to find form with three elements:
  12. "IP range start / Single IP-address"
  13. "IP range end"
  14. "List type"
  15. Two first two fields take an IP-Address in the form of "100.100.100.100". If the second field is filled,
  16. they be treated as a range. If you leave it empty, the value from the first field is only used.
  17. (This is currently the only allowed range form, other types like bitmasks may come at later stage).
  18. Type can be either "blacklist" or "whitelist",
  19. where blacklisted IP's are denied from the site, and whitelisted are allowed.
  20. Whitelists always override blacklists.
  21. DEVELOPERS
  22. ============
  23. While there is no exactly "API" available, there are some functions you can use in your code if needed:
  24. To ban IP-Address / -Range:
  25. ip_ranges_write_record($ip, $type, $bid='');
  26. Where both ip and type are entered just like from the ui. $bid, or ban id, is optional and can be used to update existing record.
  27. To retrieve list of ban records:
  28. ip_ranges_get_ip_list($type='');
  29. Again, type is either "blacklist", "whitelist" or empty. Return will be array of IP's of requested type.
  30. Ranges will be like this: "100.100.100.100-100.100.100.200".