I have a website written in ASP.NET MVC (and that means, it runs on windows server), that i want to protect from tor users. I thought about setting up some rules on windows firewall to block tor incoming connections, or something like that. Does anyone have any advices maybe? I would be very grateful.
On a Linux system, is there a way to block all in and outbound traffic unless it passes through the Tor network. This includes any form of IP communication, not just TCP connections. For example I want UDP to be completely blocked since it cannot pass through Tor. I want this systems Internet usage to be entirely anonymous, and I don't want any applications leaking.
I realize this might be complicated because Tor itself needs to communicate with relay nodes somehow.
I've been using, happily, opendns to block facebook on my network. Then I started thinking about tricks to circumvent this block and, of course, I've read here on serverfault how to block the facebook ip address. But if someone uses tor or freegate?
What can I do?
I'm setting up a server to operate as a tor relay and nothing else. I setup iptables to only allow talk on port 9001 and it worked fine, but there was an issue, the clock needs to be properly set and maintained for the relay to work properly, so I needed ntpd setup and running, but for some reason I can't get iptables to work as I want it. I'm trying to have it allow only tor and ntpd to talk over the network, but when I set it up to allow port 123 using udp, suddenly it ignores my -A OUTPUT ! -s 127.0.0.1 -j DROP and allows everything through. How should I go about this? Please excuse my ignorance, I've brand new to iptables.
I've gone through a number of permutations, but here are my rules as they stand now:
-A INPUT -p udp --sport 123 --dport 123 -j ACCEPT
-A OUTPUT -p udp --sport 123 --dport 123 -j ACCEPT
-A INPUT -p tcp -m tcp --sport 9001 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 9001 -j ACCEPT
-A INPUT ! -s 127.0.0.1 -j DROP
-A OUTPUT ! -s 127.0.0.1 -j DROP