Portal Home > Knowledgebase > Articles Database > How to block list of ip address in vps?
How to block list of ip address in vps?
Posted by new2world, 09-27-2014, 08:16 AM |
Hi,
I want to add a list of ip address say 1000 ip address which include proxies and tor.
What is the safe way to add .htaccess file? or using some other method
Kindly let me know thanks.
|
Posted by CobraWeb, 09-27-2014, 09:54 AM |
If you are on a Linux Server you can use IP Tables to block IP's for accessing your server. Login into to SSH as root and use the following syntax.
iptables -A INPUT -s 60.250.66.175 -j DROP
replacing the IP number with the one you want to block
|
Posted by byte32, 09-27-2014, 10:08 AM |
Good list of Tor IP's are updated automatically on dan.me.uk, on your script for example say a payment for application based ban - just check their ip against your database of bad ip's and/or against this torlist. Blocking via firewall would be best, but not always needed, wanted or necessarily possible if for example you are on shared hosting and do not want people using tor to access your user control panel etc.
https://www.dan.me.uk/tornodes
https://www.dan.me.uk/torlist/
|
Posted by new2world, 09-27-2014, 11:50 AM |
adding individual ip will take a lot of time.
I want a solution where I can just paste the list as Byte32 suggested. Actually I was talking about the same tor list he has provided. I want to add it in my vps so that bad users using tor list can not login on my website using tor.
Kindly suggest me better way if you guys know any thanks
|
Posted by byte32, 09-27-2014, 11:56 AM |
We need more information, in what way do you want to block access? A message in a client area ordering something? Most likely will need some custom PHP script unless one exists.
If you mean firewall wise, you will need a script to run when your server starts up and to check for updates to the list. You might also want to unblock IP's from server no longer running as a TOR exit node - someone else gets stuck with the IP after.
|
Posted by new2world, 09-27-2014, 12:07 PM |
Script will do but instead of it's check for updates. It's allow me to add or remove the ip address list which i want to add there. So that those user who are using those certain ip address can't even access my website.
Is that possible?
Currently I want to add these ip address to block
https://www.dan.me.uk/torlist/
I also tried to add this ip address list in .htaccess in the certain folder on which I don't want these users to access the file. but seems like my .htaccess is not working in my vps.
Last edited by new2world; 09-27-2014 at 12:14 PM.
|
Posted by byte32, 09-27-2014, 12:13 PM |
This may help you, how to block tor exit nodes on centos.
http://blog.geekmatt.com/tutorial-bl...odes-iptables/
|
Posted by new2world, 09-27-2014, 01:12 PM |
Perfect link thanks byte32 that will help me.
|
Add to Favourites Print this Article
Also Read
Gazzin :\ (Views: 660)