How to block an IP address using nullroutes, and IPTables

Using the Nullrouting Method Login to your server as a root user, sudo will work also. Type the following:

route add 54.87.42.61 gw 127.0.0.1 lo

54.87.42.61 is the IP address you are going to block. Once you put that in, you don’t need More >