Yes you were right, i was running transmission under wrong user. After i changed that it downloads as i should. But i do have a problem with my pia.py file. It doesnt update ipfw rules for me and if i stop openvpn the download just keeps on going.It looks like you have a permission problem with your downloads folder. From what I can see
Try
chmod +x /media/Downloads and see if it fixes the problem.
From what I can see the scripts are working fine even if the port was not open it would still download.
Make sure you have the correct permission setup in transmission and the folders.
Sent from my iPhone using Tapatalk
Im running my jails under 10.0.0.x and here's my pia.py file:
Code:
#!/usr/local/bin/python2.7 import sys import socket import subprocess url = 'sweden.privateinternetaccess.com' try: # Raise if it can't ping the server or openvpn isn't running subprocess.check_output(['/usr/sbin/service', 'openvpn', 'status']) subprocess.check_output(['/sbin/ping', '-c', '1', url]) except subprocess.CalledProcessError: pass else: sys.exit() hostname, aliaslist, ipaddrlist = socket.gethostbyname_ex(url) content = ''' add 01006 allow ip from 10.0.0.0/24 to 10.0.0.0/24 keep-state ''' rule_number = 2001 for ip in ipaddrlist: content += ''' add {} allow ip from 10.0.0.0/24 to {} keep-state add {} allow ip from {} to 10.0.0.0/24 keep-state '''.format(rule_number, ip, rule_number + 1, ip) rule_number += 2 content += ''' add 04000 allow ip from 127.0.0.1 to any add 05000 allow ip from 10.0.0.0/8 to any add 05002 allow ip from any to 10.0.0.0/8 add 65534 deny ip from any to any ''' # Stop ipfw subprocess.call(['/usr/sbin/service', 'openvpn', 'stop']) subprocess.call(['/usr/sbin/service', 'ipfw', 'stop']) f = open('/etc/ipfw_rules', 'w') f.write(content) f.close() # Start ipfw subprocess.call(['/usr/sbin/service', 'ipfw', 'start']) # Check if running if 'ipfw' in subprocess.check_output(['/usr/sbin/service', '-e']): subprocess.call(['/usr/sbin/service', 'openvpn', 'start',]) sys.exit()
Running ipfw list gives me the following:
Code:
root@transmission_2:/etc # ipfw list 00100 allow ip from any to any via lo0 00200 deny ip from any to 127.0.0.0/8 00300 deny ip from 127.0.0.0/8 to any 00400 deny ip from any to ::1 00500 deny ip from ::1 to any 00600 allow ipv6-icmp from :: to ff02::/16 00700 allow ipv6-icmp from fe80::/10 to fe80::/10 00800 allow ipv6-icmp from fe80::/10 to ff02::/16 00900 allow ipv6-icmp from any to any ip6 icmp6types 1 01000 allow ipv6-icmp from any to any ip6 icmp6types 2,135,136 65535 allow ip from any to any
/var/log/ipfw.log
shows the following:
python2.7: not found
Last edited: