Useful Homelab Networking Tools

dig google.com @127.0.0.1 -p xxxx

(where p means port, and 127.0.0.1 is implied local)

  • Test Web Traffic:
curl https://check.torproject.org/api/ip

This should show that your public IP is that of a Tor exit node.

  • Test IPv6 (if configured): If you have enabled IPv6 routing on the host and in your ip6tables, verify with:
curl -6 https://check.torproject.org/api/ip
  • Another Great One:
curl --socks5 127.0.0.1:9050 https://check.torproject.org/api/ip

If the output shows "IsTor":true, you’re fully anonymous! :rocket:

curl https://check.torproject.org/

STATUS:

systemctl status tor
systemctl status unbound
pihole status
sudo journalctl -u unbound --no-pager | tail -20
sudo journalctl -u tor --no-pager | tail -20
sudo systemctl status pihole-FTL
sudo journalctl -u pihole-FTL --no-pager | tail -20
sudo systemctl restart pihole-FTL

you can also replace restart with stop start, or replace ‘pihole-FTL’ with tor, unbound

netstat -tulnp | grep 9053

Check if DNS requests go through Tor:

dig +short whoami.akamai.net @127.0.0.1

App armor:

aa-status
ss -tulnp | grep :5335
sudo systemctl status pihole-FTL
  • sudo systemctl status tor: Checks if the Tor service is running.
  • ss -tulnp | grep tor: Verifies that Tor is listening on its default port (9050).
  • dig @127.0.0.1 -p 5335 google.com: Checks if DNS requests are being routed via Tor (assuming Pi-hole is set to forward DNS via Tor).
  • dig @127.0.0.1 -p 5335 https://dns32toronionaddr.onion: Checks if Pi-hole is resolving .onion domains (replace dns32toronionaddr.onion with a valid resolver).
  • curl https://check.torproject.org/: Verifies that your system’s IP is being routed through Tor.
  • torify curl https://check.torproject.org/: Runs a Torified curl request to ensure all web traffic is routed through Tor.
  • torify wget http://example.com: Runs a wget request through Tor to ensure web traffic routing.
  • sudo journalctl -u tor | tail -n 20: Shows the last 20 lines of the Tor logs to verify any errors or connection issues.
  • echo "Tor status checks completed.": Prints a completion message after all checks are finished.
iptables -t nat -L -v -n