====== Obtain external IP address ====== http://ifconfig.me http://checkmyip.com http://checkip.dyndns.org|sed -e 's/.*: //;s/<.*//' http://api.ipify.org Simple server which listens on a port and prints out received data nc -l -p portnumber Show apps that use internet connection at the moment. lsof -P -i -n | cut -f 1 -d " "| uniq | tail -n +2 Block known dirty hosts from reaching your machine wget -qO - http://infiltrated.net/blacklisted|awk '!/#|[a-z]/&&/./{print "iptables -A INPUT -s "$1" -j DROP"}' smtp server python -m smtpd -n -c DebuggingServer localhost:1025