Sometimes, it’s better to remain anonymous. For this, I am using the Tor anonymity network from a dedicated user account on a Linux machine. This user account is somewhat special, hence it is locked down by the local firewall and cannot open any outgoing internet connection. The only way out is the Tor network, which ensures this user’s identity is effectively kept private. Here’s how:
# part of my bashrc sudo /sbin/iptables -D OUTPUT -o eth0 -m owner --uid-owner $USER -j REJECT sudo /sbin/iptables -A OUTPUT -o eth0 -m owner --uid-owner $USER -j REJECT export LD_PRELOAD="/usr/lib/torsocks/libtorsocks.so" export HOSTNAME="somewhere" PS1="\A \[\e[30;100m\] $HOSTNAME \[\e[0m\]:\w\$ "
First, I ensure a proper firewall rule is set up which forbids all outgoing traffic (this requires sudo permissions). Then, the Torsocks library is preloaded to this environment. This ensures all programs that are invoked from this shell are also wrapped to use the Tor proxy. Torsocks wraps most programs that use TCP sockets and (in contrast to torify/socksify), it also wraps DNS requests properly. Any other UDP and ICMP traffic is effectively blocked by the local firewall.
Next thing is to figure out some special hostnames within the Tor network. For example, “elinks http://www.ip2location.com.klollely.exit/” will use the exit note klollely (which is in Russia) and “telnet towel.blinkenlights.nl.uhhhhhh.exit” will open a Telnet connection originating from Thailand. Have fund and use it for good.
