yabeenico / wsshuttle

Apache License 2.0
23 stars 3 forks source link

Multiple errors during unsuccessfull attempt #7

Closed mivsmirnov closed 1 year ago

mivsmirnov commented 1 year ago

Hello! I tried to run in from Windows Terminal as Administrator and got following errors

$ wsshuttle -r root@wifire.smirnovs.net 192.168.100.0/24 sshuttle -l 0.0.0.0:0 -r root@wifire.smirnovs.net 192.168.100.0/24 Traceback (most recent call last): File "/usr/local/bin/sshuttle", line 8, in sys.exit(main()) File "/home/msmirnov/.local/lib/python3.10/site-packages/sshuttle/cmdline.py", line 46, in main return firewall.main(opt.method, opt.syslog) File "/home/msmirnov/.local/lib/python3.10/site-packages/sshuttle/firewall.py", line 102, in main stdin, stdout = setup_daemon() File "/home/msmirnov/.local/lib/python3.10/site-packages/sshuttle/firewall.py", line 73, in setup_daemon os.setsid() PermissionError: [Errno 1] Operation not permitted c : fatal: ['/usr/bin/sudo', '-p', '[local sudo] Password: ', '/usr/bin/env', 'PYTHONPATH=/home/msmirnov/.local/lib/python3.10/site-packages', '/usr/bin/python3', '/usr/local/bin/sshuttle', '--method', 'auto', '--firewall'] returned 1

$ sudo wsshuttle -r root@wifire.smirnovs.net 192.168.100.0/24 /usr/local/bin/wsshuttle: line 143: arp.exe: command not found /usr/local/bin/wsshuttle: line 145: route.exe: command not found /usr/local/bin/wsshuttle: line 147: route.exe: command not found /usr/local/bin/wsshuttle: line 148: arp.exe: command not found /usr/local/bin/wsshuttle: line 217: powershell.exe: command not found sshuttle -l 0.0.0.0:0 -r root@wifire.smirnovs.net 192.168.100.0/24 root@wifire.smirnovs.net's password: /bin/sh: exec: line 0: python: not found c : fatal: c : server died with error code 127

yabeenico commented 1 year ago

You are probably using wsl1. wsshuttle only support wsl2. Please try checking for your wsl version.

Example:

$ wsl.exe -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2

To set the version of wsl, run wsl --set-version <distro name> 2 in the Admin PowerShell. documentation: https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2

Example:

> wsl --set-version Ubuntu 2
mivsmirnov commented 1 year ago

Unfortunately I'm on v2 wsl.exe -l -v NAME STATE VERSION

I also forgot to mention that I use Windows 10, sorry

yabeenico commented 1 year ago

Show me your software version by running following commands;

cat /etc/os-release
sshuttle -V
python -V
mivsmirnov commented 1 year ago

$ cat /etc/os-release PRETTY_NAME="Ubuntu 22.04.1 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

$ sshuttle -V 1.0.5

$ python -V Python 3.10.12

yabeenico commented 1 year ago

try

pip3 install sshuttle==1.1.1

and again

wsshuttle -r root@wifire.smirnovs.net 192.168.100.0/24