PHP Classes

How Can PHP Add IPtables Rule to Block an IP Segment Using the Tor Geoip Tools: Generate IPTables rules to block the range of a IP

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-07-18 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 103 This week: 1All time: 9,598 This week: 151Up
Version License PHP version Categories
xzygeoip 1.0GNU General Publi...5Networking, PHP 5, Unix, Geography, S...
Description Author

This class can generate IPTables rules to block the range of an IP.

It can find the IP range segment of a given IP address by looking up at a GeoIP database in CSV format generated by the Tor project geoip-db-tool command.

The class can output commands with parameters to use the iptables program to block the IP range segment.

The class can also determine the country of a user accessing a Web site based on the IP address of the user's computer.

Innovation Award
PHP Programming Innovation award nominee
July 2022
Number 8
Sometimes Web servers that run PHP sites are attacked by several machines hosted in the same network.

One way to protect against those attacks from all those machines is to block network connections from the whole IP address range segment.

This package simplifies blocking a whole IP address range segment by generating commands to run the Linux iptables command that adds rules to block all the IP addresses that belong to those range segments.

Manuel Lemos
Picture of Luis Martinez Ulloa
  Performance   Level  
Name: Luis Martinez Ulloa is available for providing paid consulting. Contact Luis Martinez Ulloa .
Classes: 12 packages by
Country: Peru Peru
Age: 50
All time rank: 4001 in Peru Peru
Week rank: 51 Up2 in Peru Peru Down
Innovation award
Innovation award
Nominee: 5x

Screenshots  
  • geoip04.png
  • geoip05.png
  • geoip05b.png
  • pgdrop2.png
  Files folder image Files  
File Role Description
Accessible without login Plain text file geoip Data Bonus: geoip file
Accessible without login Plain text file geoip.conf.php Conf. Configuration file
Plain text file geoip.php Class class file
Accessible without login Plain text file index.php Example Web page example
Accessible without login Plain text file pgdrop.php Example Example script
Accessible without login Image file pgdrop.png Photo Example of use

 Version Control Unique User Downloads Download Rankings  
 0%
Total:103
This week:1
All time:9,598
This week:151Up
User Comments (6)
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
Tor connects through chains of servers, which means that it ...
2 months ago (SyntaxWEB ?6stPROD? WowSuite)
17%Star
 
For more information send a message to info at phpclasses dot org.