Advertisement
Guest User

torrentvpn.sh

a guest
Feb 28th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1.  
  2. #!/bin/sh
  3.  
  4. #Script to modify the transmission settings to bind to the VPN IP
  5. #HTPCGuides.com
  6.  
  7. #enter the /etc/openvpn directory
  8. cd /etc/openvpn
  9.  
  10. #stop the transmission-daemon
  11. sudo service transmission-daemon stop
  12. #Plug the VPN IP into transmission
  13. sed 's/.*"bind-address-ipv4":.*/ "bind-address-ipv4": '$ifconfig_remote',/' /etc/transmission-daemon/settings.json
  14.  
  15. #add PIA DNS servers
  16. echo "nameserver 209.222.18.222" | sudo tee -a /etc/resolv.conf
  17. echo "nameserver 209.222.18.218" | sudo tee -a /etc/resolv.conf
  18.  
  19. # add routing to retain remote access
  20. sudo ip rule add from 192.168.1.209 table 128
  21. sudo ip route add table 128 to 192.168.1.0/24 dev eth0
  22. sudo ip route add table 128 default via 192.168.1.1
  23.  
  24. #start the transmission.daemon
  25. sudo service transmission-daemon start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement