sfiorini / NordVPN-Wireguard

A bash scripts that generates Wireguard configuration file for a NordVPN connection.
229 stars 40 forks source link

-bash: ./NordVpnToWireguard.sh: No such file or directory #5

Open Tesla-P100FX opened 2 years ago

Tesla-P100FX commented 2 years ago

i am not much of a raspberry expert can you help with permissions

hogwarts@raspberrypi:~/.scrypted $ nordvpn login Howarts xxxxx --legacy rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial unix /run/nordvpn/nordvpnd.sock: connect: permission denied" -Whoops! Permission denied accessing /run/nordvpn/nordvpnd.sock Run 'usermod -aG nordvpn $USER' to fix this issue and log out of OS afterwards for this to take an effect. hogwarts@raspberrypi:~/.scrypted $ usermod -aG nordvpn hogwarts usermod: Permission denied. usermod: cannot lock /etc/passwd; try again later. hogwarts@raspberrypi:~/.scrypted $ ^C

sfiorini commented 2 years ago

Based on the info provided, usermod did not work because it needs to run as sudo. Try sudo usermod -aG nordvpn hogwarts

Tesla-P100FX commented 2 years ago

OK that helped i am such a noob on this sorry i need more help. It then said "Continue in the browser: https://napps-1.com/v1/users/oauth/login-redirect?attempt=7af19d0f-ce9a-44........." I did that and went back to the raspberrypi window when i entered nordvpntowinguard.sh it said command not found which i guess it meant the original script did not execute properly right?

sfiorini commented 2 years ago

Sounds like you are missing some pre-requisites. Did you run sudo apt install wireguard curl jq net-tools ?

Tesla-P100FX commented 2 years ago

OK i just tried again on a newly imaged RaspberryPi and got the same thing. Here is the complete log

is the command verbatim ./NordVpnToWireguard.sh ??

It looks like all things completed.

i ssh'd into this machine to do the below . Is that an issue? After it didn't work again i went back and did the login and ./NordVpnToWireguard.sh on connected monitor and keyboard with the same result.

Has to be a Noob thing.

Thanks for your help

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jul 12 06:27:31 2022 admin@raspberrypi:~ $ sudo apt install wireguard curl jq net-tools Reading package lists... Done Building dependency tree... Done Reading state information... Done curl is already the newest version (7.74.0-1.3+deb11u1). net-tools is already the newest version (1.60+git20181103.0eebece-1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libjq1 libonig5 wireguard-tools The following NEW packages will be installed: jq libjq1 libonig5 wireguard wireguard-tools 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 440 kB of archives. After this operation, 1,358 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf libonig5 armhf 6.9.6-1.1 [162 kB] Get:2 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf libjq1 armhf 1.6-2.1 [129 kB] Get:3 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf jq armhf 1.6-2.1 [64.6 kB] Get:4 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf wireguard-tools armhf 1.0.20210223-1 [76.2 kB] Get:5 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf wireguard all 1.0.20210223-1 [8,164 B] Fetched 440 kB in 2s (190 kB/s) Selecting previously unselected package libonig5:armhf. (Reading database ... 101640 files and directories currently installed.) Preparing to unpack .../libonig5_6.9.6-1.1_armhf.deb ... Unpacking libonig5:armhf (6.9.6-1.1) ... Selecting previously unselected package libjq1:armhf. Preparing to unpack .../libjq1_1.6-2.1_armhf.deb ... Unpacking libjq1:armhf (1.6-2.1) ... Selecting previously unselected package jq. Preparing to unpack .../archives/jq_1.6-2.1_armhf.deb ... Unpacking jq (1.6-2.1) ... Selecting previously unselected package wireguard-tools. Preparing to unpack .../wireguard-tools_1.0.20210223-1_armhf.deb ... Unpacking wireguard-tools (1.0.20210223-1) ... Selecting previously unselected package wireguard. Preparing to unpack .../wireguard_1.0.20210223-1_all.deb ... Unpacking wireguard (1.0.20210223-1) ... Setting up wireguard-tools (1.0.20210223-1) ... wg-quick.target is a disabled or a static unit, not starting it. Setting up libonig5:armhf (6.9.6-1.1) ... Setting up wireguard (1.0.20210223-1) ... Setting up libjq1:armhf (1.6-2.1) ... Setting up jq (1.6-2.1) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u3) ... admin@raspberrypi:~ $ sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh) /usr/bin/apt-get Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. The following NEW packages will be installed: apt-transport-https 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 160 kB of archives. After this operation, 166 kB of additional disk space will be used. Get:1 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf apt-transport-https all 2.2.4 [160 kB] Fetched 160 kB in 1s (276 kB/s) Selecting previously unselected package apt-transport-https. (Reading database ... 101740 files and directories currently installed.) Preparing to unpack .../apt-transport-https_2.2.4_all.deb ... Unpacking apt-transport-https (2.2.4) ... Setting up apt-transport-https (2.2.4) ... /usr/bin/wget deb https://repo.nordvpn.com//deb/nordvpn/debian stable main Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Get:3 https://repo.nordvpn.com//deb/nordvpn/debian stable InRelease [5,305 B] Get:4 https://repo.nordvpn.com//deb/nordvpn/debian stable/main armhf Packages [1,882 B] Fetched 7,187 B in 2s (3,758 B/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: iptables libip6tc2 libnetfilter-conntrack3 libnfnetlink0 Suggested packages: firewalld The following NEW packages will be installed: iptables libip6tc2 libnetfilter-conntrack3 libnfnetlink0 nordvpn 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 19.4 MB of archives. After this operation, 50.8 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 https://repo.nordvpn.com//deb/nordvpn/debian stable/main armhf nordvpn armhf 3.14.1 [19.0 MB] Get:2 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf libip6tc2 armhf 1.8.7-1 [33.0 kB] Get:3 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libnfnetlink0 armhf 1.0.1-3+b1 [12.4 kB] Get:4 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf libnetfilter-conntrack3 armhf 1.0.8-3 [32.5 kB] Get:5 http://mirror.web-ster.com/raspbian/raspbian bullseye/main armhf iptables armhf 1.8.7-1 [328 kB] Fetched 19.4 MB in 3s (6,967 kB/s) Selecting previously unselected package libip6tc2:armhf. (Reading database ... 101744 files and directories currently installed.) Preparing to unpack .../libip6tc2_1.8.7-1_armhf.deb ... Unpacking libip6tc2:armhf (1.8.7-1) ... Selecting previously unselected package libnfnetlink0:armhf. Preparing to unpack .../libnfnetlink0_1.0.1-3+b1_armhf.deb ... Unpacking libnfnetlink0:armhf (1.0.1-3+b1) ... Selecting previously unselected package libnetfilter-conntrack3:armhf. Preparing to unpack .../libnetfilter-conntrack3_1.0.8-3_armhf.deb ... Unpacking libnetfilter-conntrack3:armhf (1.0.8-3) ... Selecting previously unselected package iptables. Preparing to unpack .../iptables_1.8.7-1_armhf.deb ... Unpacking iptables (1.8.7-1) ... Selecting previously unselected package nordvpn. Preparing to unpack .../nordvpn_3.14.1_armhf.deb ... Unpacking nordvpn (3.14.1) ... Setting up libip6tc2:armhf (1.8.7-1) ... Setting up libnfnetlink0:armhf (1.0.1-3+b1) ... Setting up libnetfilter-conntrack3:armhf (1.0.8-3) ... Setting up iptables (1.8.7-1) ... update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode Setting up nordvpn (3.14.1) ... NordVPN for Linux successfully installed! To get started, please re-login or execute su - $USER in the current shell, type 'nordvpn login' and enter your NordVPN account details. Then type 'nordvpn connect' and you’re all set! To allow other users to use the application run 'usermod -aG nordvpn otheruser'. If you need help using the app, use the command 'nordvpn --help'. Processing triggers for desktop-file-utils (0.26-1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1) ... Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u3) ... Processing triggers for man-db (2.9.4-2) ... Processing triggers for mailcap (3.69) ... admin@raspberrypi:~ $ sudo nordvpn set technology nordlynx Technology is already set to 'NORDLYNX'. admin@raspberrypi:~ $ ./NordVpnToWireguard.sh --city Seattle -bash: ./NordVpnToWireguard.sh: No such file or directory admin@raspberrypi:~ $ /NordVpnToWireguard.sh -bash: /NordVpnToWireguard.sh: No such file or directory admin@raspberrypi:~ $ NordVpnToWireguard.sh -bash: NordVpnToWireguard.sh: command not found admin@raspberrypi:~ $ $ ./NordVpnToWireguard.sh -bash: $: command not found admin@raspberrypi:~ $ nordvpn login hogwarts xxx --legacy Continue in the browser: https://napps-1.com/v1/users/oauth/login-redirect?attempt=a52944bb-9bf4-47e9-a66e-ce545462d16b admin@raspberrypi:~ $ ./NordVpnToWireguard.sh -bash: ./NordVpnToWireguard.sh: No such file or directory admin@raspberrypi:~ $ NordVpnToWireguard.sh -bash: NordVpnToWireguard.sh: command not found admin@raspberrypi:~ $

somiljainvba commented 10 months ago

Same issue , any updates on this getting error $ ./NordVpnToWireguard.sh -bash: ./NordVpnToWireguard.sh: No such file or directory

krohn commented 10 months ago

Are you sure that after cloning this repo, you change to the directory? According to your logs, you are in your home-directory (admin@raspberrypi:~) which would be an uncommon place for cloned repositories. Might be you only need to cd NordVPN-Wireguard:

git clone https://github.com/sfiorini/NordVPN-Wireguard.git
cd NordVPN-Wireguard
./NordVpnToWireguard.sh --city Seattle
...
somiljainvba commented 10 months ago

Still the same issue image

krohn commented 10 months ago

try ./NordVpnToWireguard.sh --country Australia --city Melbourne instead of $ ./NordVpnToWireguard.sh --country Australia --city Melbourne

somiljainvba commented 10 months ago

Worked thank you