# TOR_Transparent_Proxy Instructions for setting up a TOR transparent proxy. 1. Install the latest version of tor. Here is the official Debian repo for tor: https://support.torproject.org/apt/tor-deb-repo/ https://gitlab.torproject.org/legacy/trac/-/wikis/doc/TransparentProxy#anonymizing-middlebox https://www.experts-exchange.com/articles/16980/How-to-set-up-a-TOR-Transparent-Proxy.html https://obscurix.github.io/transparent-proxy.html ``` _trans_port="9040" # Tor's TransPort _inc_if="eth1" iptables -F iptables -t nat -F iptables -t nat -A PREROUTING -i $_inc_if -p udp --dport 53 -j REDIRECT --to-ports 5353 iptables -t nat -A PREROUTING -i $_inc_if -p udp --dport 5353 -j REDIRECT --to-ports 5353 iptables -t nat -A PREROUTING -i $_inc_if -p tcp --syn -j REDIRECT --to-ports $_trans_port ``` ap_arp_status.sh ``` #!/bin/bash ap_interface="eth1" arp -i $ap_interface | grep -o ..:..:..:..:..:.. > /tmp/$0.activemacs.txt clear echo -e "\033[1mConnected Clients:\033[0m" while read mac; do grep "$mac" /var/lib/misc/dnsmasq.leases | cut -d' ' -f2,3,4 done < /tmp/$0.activemacs.txt echo -e "\n\n\033[1mAll clients which have connected within the last 24h:\033[0m" cut /var/lib/misc/dnsmasq.leases -d' ' -f2,3,4 | column -t -s ' ' rm /tmp/$0.activemacs.TOR_Transparent_Proxy ``` ios_client_associations.sh ``` #!/bin/bash main () { sleep 0.3s echo Cisco sleep 0.3s echo password sleep 0.1s echo enable sleep 0.1s echo Cisco sleep 0.1 echo "show dot11 associations client" sleep 1m echo exit } while true; do clear main | telnet 192.168.1.2 | grep 'MAC Address' -A 30 sleep 1 done ```