Skip to content

Unable to connect after upgrading client to Ubuntu 20.04 #434

@thesurlydev

Description

@thesurlydev

Previously, I was able to connect using Ubuntu 19.04 client to connect to a Mac OS laptop which uses Python 3.7.7. I don't remember which version of Python Ubuntu 19.04 was using.

After upgrading client to Ubuntu 20.04, which runs Python 3.8.2 by default, I'm no longer able to connect.

Using the following command:

sshuttle -vvv --dns -r 'user@laptop' 0/0

I get the following output:

Starting sshuttle proxy.
firewall manager: Starting firewall with Python version 3.8.2
firewall manager: ready method name nat.
IPv6 enabled: False
UDP enabled: False
DNS enabled: True
User enabled: False
Binding redirector: 12300
TCP redirector listening on ('127.0.0.1', 12300).
TCP redirector listening with <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 12300)>.
Binding DNS: 12300 12299
DNS listening on ('127.0.0.1', 12299).
DNS listening with <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('127.0.0.1', 12299)>.
Starting client with Python version 3.8.2
c : connecting to server...
c : executing: ['ssh', 'user@laptop', '--', 'exec /bin/sh -c \'P=python3; $P -V 2>/dev/null || P=python; exec "$P" -c \'"\'"\'import sys, os; verbosity=3; sys.stdin = os.fdopen(0, "rb"); exec(compile(sys.stdin.read(1106), "assembler.py", "exec"))\'"\'"\'\'']
c :  > channel=0 cmd=PING len=7 (fullness=0)
server: assembling u'sshuttle' (7 bytes)
server: assembling u'sshuttle.cmdline_options' (66 bytes)
server: assembling u'sshuttle.helpers' (944 bytes)
server: assembling u'sshuttle.ssnet' (5653 bytes)
server: assembling u'sshuttle.hostwatch' (2386 bytes)
server: assembling u'sshuttle.server' (3830 bytes)
Starting server with Python version 2.7.16
 s: latency control setting = True
 s:  > channel=0 cmd=PING len=7 (fullness=0)
 s: auto-nets:False
 s:  > channel=0 cmd=ROUTES len=0 (fullness=7)
 s: Waiting: 1 r=[4] w=[5] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[5] x=[]
 s: mux wrote: 15/15
 s: Waiting: 1 r=[4] w=[5] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[5] x=[]
 s: mux wrote: 8/8
 s: Waiting: 1 r=[4] w=[] x=[] (fullness=7/0)
c : Connected.
c : Waiting: 3 r=[5, 7, 9] w=[9] x=[] (fullness=7/0)
c :   Ready: 3 r=[9] w=[9] x=[]
c : <  channel=0 cmd=PING len=7
c :  > channel=0 cmd=PONG len=7 (fullness=7)
c : <  channel=0 cmd=ROUTES len=0
firewall manager: Got subnets: [(2, 0, False, '0.0.0.0', 0, 0), (2, 32, True, '127.0.0.1', 0, 0)]
firewall manager: Got partial nslist: [(2, '127.0.0.53')]
firewall manager: Got nslist: [(2, '127.0.0.53')]
firewall manager: Got ports: 0,12300,0,12299
firewall manager: Got udp: False, user: None
firewall manager: setting up.
firewall manager: setting up IPv4.
>> iptables -t nat -N sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -I OUTPUT 1 -j sshuttle-12300
>> iptables -t nat -I PREROUTING 1 -j sshuttle-12300
>> iptables -t nat -A sshuttle-12300 -j RETURN --dest 127.0.0.1/32 -p tcp
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest 0.0.0.0/0 -p tcp --to-ports 12300 -m ttl ! --ttl 42
>> iptables -t nat -A sshuttle-12300 -j REDIRECT --dest 127.0.0.53/32 -p udp --dport 53 --to-ports 12299 -m ttl ! --ttl 42
c : mux wrote: 15/15
c : mux wrote: 15/15
c : Waiting: 3 r=[5, 7, 9] w=[] x=[] (fullness=14/0)
client_loop: send disconnect: Broken pipe
c :   Ready: 3 r=[9] w=[] x=[]
firewall manager: undoing changes.
firewall manager: undoing IPv4 changes.
>> iptables -t nat -D OUTPUT -j sshuttle-12300
>> iptables -t nat -D PREROUTING -j sshuttle-12300
>> iptables -t nat -F sshuttle-12300
>> iptables -t nat -X sshuttle-12300
firewall manager: undoing /etc/hosts changes.
c : fatal: server died with error code 255

I've seen similar issues opened around Python 3.8 but none of the workarounds have worked for me. Any suggestions are appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions