Thursday, June 30, 2016

IT Discussion in a Milist Script PHP for Blocking IP Addresses

Greetings,

I want to ask, whether or not if we develop or use a simple web (e.g. Joomla, etc) then  we could setup some specific public IP addresses to not access our website?
If getting traced or ping-ed it seems to be normal.

If someone could help,  I greatly thank you.


regards
-------------------------------------------------



It could, set it from its CPanel web / domain


regards
----------------------------------------------

OK thanks for your info ... but if getting traced or ping-ed it seems to be normal, so only  when getting accessed from a browser it couldnt be accessed.
However if we access using another connection then I think whether my public IP is getting blocked?

regards
-------------------------------------------

The most frequent occurrence as such is from speedy, probably because the user is speedy (with a specific IP address range) that send a lot of spam so that the IP address ranges included in the list of spam house, consequently if we want to access a particular web address using a speedy connection, then access will be blocked, whereas if you use the internet connection instead of speedy, the internet access runs normally.
The way that can be normal again, ask for a speedy person to realease your IP address or change the IP address.

regards
----------------------------------

if using php, write a simple script, for example in index.php
put it on top, for example

$ banned_ips = array (x.x.x.x, y.y.y.y, z.z.z.z);

if (in_array ($ _ SERVER [REMOTE_ADDR], $ banned_ips)) {
                 die ();
                  }
?>

where xxxx - zzzz, is the list of IP addresses that we will be ban

hopefully helpful

regards