jotyGill / openpyn-nordvpn

Easily connect to and switch between, OpenVPN servers hosted by NordVPN on Linux (+patch leakes)
GNU General Public License v3.0
628 stars 114 forks source link

error using -f --allow 22 80 #112

Open Novocaine85 opened 6 years ago

Novocaine85 commented 6 years ago

using this command: openpyn it --p2p -f --allow 80 22 -d

got this error:

Mar 11 19:45:57 localhost openpyn[3091]: Device "bonding_masters" does not exist.
Mar 11 19:45:57 localhost openpyn[3091]: Flushing iptables INPUT and OUTPUT chains AND Applying default Rules
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mAccording to NordVPN, Least Busy #033[32m10#033[34m Servers, In #033[32mIT#033[34m #033[34mWith 'Load' less than #033[32m70#033[34m Which Support #033[32mOPENVPN-UDP , p2p =  True #033[34mare :#033[32m [['it36', 16], ['it21', 18], ['it26', 18], ['it41', 19], ['it38', 20], ['it40', 20], ['it18', 22], ['it23', 24], ['it25', 24], ['it20', 25]] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it36 min/avg/max/mdev =  #033[32m[37, 39, 42, 1] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it21 min/avg/max/mdev =  #033[32m[38, 41, 44, 2] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it26 min/avg/max/mdev =  #033[32m[37, 44, 52, 5] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it41 min/avg/max/mdev =  #033[32m[37, 38, 40, 1] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it38 min/avg/max/mdev =  #033[32m[36, 38, 39, 0] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it40 min/avg/max/mdev =  #033[32m[39, 40, 42, 1] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it18 min/avg/max/mdev =  #033[32m[37, 39, 42, 2] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it23 min/avg/max/mdev =  #033[32m[37, 38, 38, 0] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it25 min/avg/max/mdev =  #033[32m[38, 40, 43, 1] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[1m#033[34mPinging Server it20 min/avg/max/mdev =  #033[32m[37, 39, 44, 2] #033[34m
Mar 11 19:45:57 localhost openpyn[3091]: Top #033[32m10#033[34m Servers with best Ping are: #033[32m['it38', 'it23', 'it41', 'it36', 'it18', 'it20', 'it40', 'it25', 'it21', 'it26']#033[34m
Mar 11 19:45:57 localhost openpyn[3091]: #033[0m
Mar 11 19:45:57 localhost openpyn[3091]: Traceback (most recent call last):
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/local/bin/openpyn", line 9, in <module>
Mar 11 19:45:57 localhost openpyn[3091]:     load_entry_point('openpyn==2.4.2', 'console_scripts', 'openpyn')()
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 133, in main
Mar 11 19:45:57 localhost openpyn[3091]:     args.skip_dns_patch, args.silent, args.nvram, args.openvpn_options)
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 301, in run
Mar 11 19:45:57 localhost openpyn[3091]:     network_interfaces = get_network_interfaces()
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 605, in get_network_interfaces
Mar 11 19:45:57 localhost openpyn[3091]:     interface_out = subprocess.check_output(["ip", "addr", "show", interface])
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
Mar 11 19:45:57 localhost openpyn[3091]:     **kwargs).stdout
Mar 11 19:45:57 localhost openpyn[3091]:   File "/usr/lib/python3.5/subprocess.py", line 708, in run
Mar 11 19:45:57 localhost openpyn[3091]:     output=stdout, stderr=stderr)
Mar 11 19:45:57 localhost openpyn[3091]: subprocess.CalledProcessError: Command '['ip', 'addr', 'show', 'bonding_masters']' returned non-zero exit status 1

any help is apreciated. thanks in advance

jotyGill commented 6 years ago

Hi, what OS and version are you using? looks like the output of "ls /sys/class/net" included word "bonding_masters". This is supposed to spit out the names of interfaces on your machine. like "enp0s25 lo virbr0 virbr0-nic wlo1"

Does everything work without "-f"?

Novocaine85 commented 6 years ago

Hi, I'm on a banana pi pro using armbian.

It works correctly without -f

bonding_masters is present in /system/class/net

[10:00:32]root@bananapipro>[~]: ls /sys/class/net
bond0  bonding_masters  eth0  lo  tun0  wlan0
[10:00:50]root@bananapipro>[~]: cat /sys/class/net/bonding_masters
bond0
Jorman commented 6 years ago

Here the same, if I use the -f option, I got error

Device "bonding_masters" does not exist.
Traceback (most recent call last):
  File "/usr/local/bin/openpyn", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 144, in main
    args.skip_dns_patch, args.silent, args.nvram, args.openvpn_options, args.location)
  File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 406, in run
    network_interfaces = get_network_interfaces()
  File "/usr/local/lib/python3.5/dist-packages/openpyn/openpyn.py", line 766, in get_network_interfaces
    interface_out = subprocess.check_output(["ip", "addr", "show", interface])
  File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ip', 'addr', 'show', 'bonding_masters']' returned non-zero exit status 1

My actual configuration have one bond activated:

ls -lah /sys/class/net
total 0
drwxr-xr-x  2 root root    0 Nov 14 21:33 .
drwxr-xr-x 49 root root    0 Nov 14 21:15 ..
lrwxrwxrwx  1 root root    0 Nov 14 21:15 bond0 -> ../../devices/virtual/net/bond0
-rw-r--r--  1 root root 4.0K Nov 14 21:15 bonding_masters
lrwxrwxrwx  1 root root    0 Nov 14 21:15 enp4s0 -> ../../devices/pci0000:00/0000:00:1c.3/0000:04:00.0/net/enp4s0
lrwxrwxrwx  1 root root    0 Nov 14 21:15 enp5s0 -> ../../devices/pci0000:00/0000:00:1c.4/0000:05:00.0/net/enp5s0
lrwxrwxrwx  1 root root    0 Nov 14 21:15 lo -> ../../devices/virtual/net/lo
root@Qnap:~# cat /sys/class/net/bonding_masters
bond0