sshuttle / sshuttle/sshuttle

c : fatal: server died with error code 255

Open
#774 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.6k
Forks
795
Avg merge
8h 49m
Merged PRs (30d)
12

Description

Hi,

I want to use sshuttle inside my servers! but it get my own ssh connection disconnect!

I have two ubuntu servers, and i want to use sshttle between those but as i connect via ssh to one of them and then i want to run sshuttle, So my own ssh connection to one of them get dissconected and thus the whole sshuttle get an error ( while i use tmux).

here is the error:

sshuttle --dns -r ubuntu@10.10.10.56 0/0 --ssh-cmd 'ssh -i Aha.pem' -vvv
Starting sshuttle proxy.
firewall manager: Starting firewall with Python version 3.8.10
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.10
c : connecting to server...
c : executing: ['ssh', '-i', 'Aha.pem', 'ubuntu@10.10.10.56', '--', '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(1317), "assembler.py", "exec"))\'"\'"\'\'']
c :  > channel=0 cmd=PING len=7 (fullness=0)
c : Connected.
c : Waiting: 3 r=[5, 7, 9] w=[9] x=[] (fullness=7/0)
assembler.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
server: assembling 'sshuttle' (7 bytes)
server: assembling 'sshuttle.cmdline_options' (66 bytes)
server: assembling 'sshuttle.helpers' (944 bytes)
server: assembling 'sshuttle.ssnet' (5776 bytes)
server: assembling 'sshuttle.hostwatch' (2388 bytes)
server: assembling 'sshuttle.server' (3787 bytes)
Starting server with Python version 3.8.10
 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=[0] w=[1] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[1] x=[]
 s: mux wrote: 15/15
 s: Waiting: 1 r=[0] w=[1] x=[] (fullness=7/0)
 s:   Ready: 1 r=[] w=[1] x=[]
 s: mux wrote: 8/8
 s: Waiting: 1 r=[0] w=[] 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported sshuttle --dns command between the two Ubuntu servers and review the verbose output around iptables setup and the SSH broken-pipe disconnect. The issue names no repository file or test, so first determine whether the failure is reproducible and identify the component responsible; done means establishing a clear fix or confirmed external cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, ubuntu
Domain
cli, networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.