Advertisement
Hacker_likani

boh

May 25th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. iptables --flush
  3. iptables --table nat --flush
  4. iptables --delete-chain
  5. iptables --table nat --delete-chain
  6. rm -f /var/log/tor/notices.log
  7. touch /var/log/tor/notices.log
  8. chown debian-tor /var/log/tor/notices.log
  9. chmod 644 /var/log/tor/notices.log
  10. case $1 in
  11. start)
  12. iptables --table nat --append PREROUTING -i eth1 -p udp --dport 53 -j REDIRECT --to-ports 53
  13. iptables --table nat --append PREROUTING -i eth1 -p tcp --syn -j REDIRECT --to-ports 9040
  14. service tor start
  15. ;;
  16. stop)
  17. service tor stop
  18. ;;
  19. *)
  20. echo "Usage: $(basename $0) [start|stop]"
  21. ;;
  22. Esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement