Guest Posted January 16, 2006 Posted January 16, 2006 I sell download products and the delivery is immediate. Orders from some regions are almost 100% fraudulent. The gateway only provides a ban mechanism with IP address or IP class (with 3 sections), but not an IP range. For instance, the IP address allocated to Vietnam Posts and Telecommunications is 221.132.0.0 - 221.132.63.255. I want to ban the entire range. Is there a way or a contribution in osCommerce to ban a range of IP address?
user99999999 Posted January 16, 2006 Posted January 16, 2006 Add to .htaccess file in website document root deny from 221.132.0.0 - 221.132.63.255 http://httpd.apache.org/docs/1.3/mod/mod_access.html
Guest Posted January 16, 2006 Posted January 16, 2006 Hi user99999999, Is there a list of IP's that belong to each specific country?
user99999999 Posted January 16, 2006 Posted January 16, 2006 Hi... I think you can find them all in tthis FTP site. ftp://ftp.apnic.net/public/stats An alternate method would be to use the geoiip.dat and have a redirect basded on country. The supertracker mod uses geoip. http://www.oscommerce.com/community/contributions,3924
Guest Posted January 16, 2006 Posted January 16, 2006 Thank you for the reply. I checked the syntax of deny from clause. It seems that I cannot put a range. It only supports IP or broad IP such as 221.132.*.*. For the range I have, I need to have a list as: 221.132.0.* 221.132.1.* 221.132.2.* ... 221.132.63.* That is not practical since I have a lots of IP ranges like this That I want to deny. Perhaps there is way to add an php header such as: <?php $blocklist = array("...", "...", ...); // a list of IP or IP range that you want to deny if ($_SERVER['REMOTE_ADDR'] falls into one of the range listed in blocklist)) { header("Location: your information why the access is denied"); exit(); } ?> I was wondering if there is any contribution that I can use. Add to .htaccess file in website document root deny from 221.132.0.0 - 221.132.63.255 http://httpd.apache.org/docs/1.3/mod/mod_access.html
user99999999 Posted January 16, 2006 Posted January 16, 2006 Your right Here is a tool to help you create it. http://www.purlgurl.net/~tools/range2subnet.html
Guest Posted January 17, 2006 Posted January 17, 2006 Your right Here is a tool to help you create it. http://www.purlgurl.net/~tools/range2subnet.html Thank you! That tool really helps. I was able to create an IP range using the mask in the .htaccess file.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.