Advertisement
cheako

Torify WiFi.

Sep 22nd, 2012
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. dpkg-divert --local --rename /usr/bin/slirpvde
  2. cat >>/usr/bin/slirpvde <<'EOF'
  3. #!/bin/sh
  4. ## torify can't handle DNS from slirpvde. DNS hack included.
  5. exec /usr/bin/torify $0.distrib "$@"
  6. EOF
  7. chmod a+x /usr/bin/slirpvde
  8.  
  9. # Shorewall interface for br1 options routeback,dhcp,tcpflags,nosmurfs,sfilter=(169.254.0.0/16,192.168.17.0/24)
  10.  
  11. # /etc/network/interfaces on Debian
  12. auto br1
  13. iface br1 inet static
  14. address 10.0.2.3 # Impersonate the DNS server, make sure to set one up.
  15. netmask 255.255.255.0
  16. bridge_ports wlan0 tun0
  17. bridge_fd 0
  18. bridge_hello 0
  19. bridge_maxage 2
  20. bridge_stp off
  21. pre-up ifup wlan0 tun0
  22. up ip addr show "wlan0" | awk '$3 ~ /^scope$/ && $4 ~ /^link$/ {system("daemon -- ip addr del "$2" dev '"wlan0"'");}'
  23. up ip addr show "tun0" | awk '$3 ~ /^scope$/ && $4 ~ /^link$/ {system("daemon -- ip addr del "$2" dev '"tun0"'");}'
  24. post-down ifdown wlan0 tun0
  25. iface br1 inet6 static
  26. address 2001:470:c4f7:4::1
  27. netmask 64
  28. post-up invoke-rc.d radvd restart
  29.  
  30. iface wlan0 inet manual
  31. hostapd /etc/hostapd/hostapd-wlan0.conf
  32. up ip addr show "$IFACE" | awk '$3 ~ /^scope$/ && $4 ~ /^link$/ {system("daemon -- ip addr del "$2" dev '"$IFACE"'");}'
  33.  
  34. iface tun0 inet manual
  35. vde2-switch -
  36. vde2-plug vde_plug2tap -s- tun0
  37. vde2-slirp -dhcp
  38. up ip addr show "$IFACE" | awk '$3 ~ /^scope$/ && $4 ~ /^link$/ {system("daemon -- ip addr del "$2" dev '"$IFACE"'");}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement