Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- iptables --flush
- iptables --table nat --flush
- iptables --delete-chain
- iptables --table nat --delete-chain
- rm -f /var/log/tor/notices.log
- touch /var/log/tor/notices.log
- chown debian-tor /var/log/tor/notices.log
- chmod 644 /var/log/tor/notices.log
- case $1 in
- start)
- iptables --table nat --append PREROUTING -i eth1 -p udp --dport 53 -j REDIRECT --to-ports 53
- iptables --table nat --append PREROUTING -i eth1 -p tcp --syn -j REDIRECT --to-ports 9040
- service tor start
- ;;
- stop)
- service tor stop
- ;;
- *)
- echo "Usage: $(basename $0) [start|stop]"
- ;;
- Esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement