Tag Archives: IP Adress

I monitor few websites for friends and had to configure security modules in order to prevent brute force attacks and breaches in the admin interface of the website. For CMS like WordPress and Drupal there are some good security modules like iThemesSecurity, Security Review and Login Security. These modules improve the security of a website by limiting the number of failed login attempts and blocking the suspicious IP address.

Over time I collected a list of backlisted IP addresses which I share here. One thing I learnt is that attacks can come from anywhere. I believe that some of these IP addresses belong to a botnet of compromised computers as I could trace their coordinates to some very well-known locations in the world.

Here below is the table of blacklisted IP addresses. The same list is in this CSV file. The data is courtesy of MaxMind and the list was last updated on 16th April 2016.

I regularly log into different Linux machines on the cloud and find complicated to identify on which machine I am by looking at the bash prompt. In fact, in cloud environments the bash prompt tends to show an ugly internal IP address which I can never memorize. Plus, I always fear to log into the production environment by mistake and run experimental commands intended to be executed in the development environment.

In order to overcome my fears, I put together few lines of bash code to be added at the beginning of ~/.bashrc:

Shell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

# get public IP address

aliasmyip="curl -s http://whatismyip.akamai.com"

# display environment in bash prompt

case$(myip)in

1.2.34.567)PS1="[\u@\h DEV \W]\$ "

;;

1.2.34.568)PS1="[\u@\h STAGE \W]\$ "

;;

1.2.34.569)PS1="[\u@\h LIVE \W]\$ "

;;

*)PS1="[\u@\h OTHER \W]\$ "

;;

esac

Line 2 retrieves the IP address from an external web service and map it to myip. Lines 5-14 modify the bash prompt (PS1) based on the value of myip and each IP address (e.g. 1.2.34.567) is mapped to a string appearing in the prompt (e.g. DEV).