On Sat, 6 June 2015, at 12:04 pm, Jarry <[email protected]> wrote:
> 
> …  (ip-lookup of source addresses always points
> to tor-exit.watever). How can I block this tor-traffic completely?
> 
> How can I feed this list to iptables? Is there some ready-to-use
> solution, or do I have to parse this list through some script
> I have to write first?

I would have thought you could just have the webserver deny access to the 
tor-exit.watever domain.

For Apache, ctrl-f "domain" on this page: 
http://httpd.apache.org/docs/2.2/howto/access.html

NB: if you google "how to block tor", DNS based denial seems to be the 
recommended solution:

   https://www.torproject.org/docs/faq-abuse.html.en#Bans
   https://www.torproject.org/projects/tordnsel.html.en

If you wanted to run a daily "add to iptables script" then you could extract 
those IPs with:
 
   curl https://check.torproject.org/exit-addresses | grep ExitAddress | cut -d 
' ' -f 2

This is a bit primitive, but you can see it works.

Stroller.


Reply via email to