11

after last OS upgrade can't connect to server by sshuttle. it work normally for year but after upgrade get this error :

sshuttle --dns -r root@server  0.0.0.0/0 -vv
packet_write_wait: Connection to server port 22: Broken pipe
c : Waiting: 3 r=[5, 7, 9] w=[] x=[] (fullness=14/0)
c :   Ready: 3 r=[9] w=[] x=[]
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 had already search on google but most of it is about ClientAliveInterval, ClientAliveCountMax, ServerAliveInterval.reinstall sshuttle and reset config not help. work on ubuntu 17.10 by same config.

damavandi
  • 131
  • 1
  • 6
  • 2
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Dec 17 '17 at 12:39
  • Good question for serverfault.com but I never moved a question before, not sure what the process is. – PJ Brunet Jun 02 '18 at 02:15

3 Answers3

13

A solution was posted on https://github.com/sshuttle/sshuttle/issues/150

Apparently one now needs to add -x <host> to the command (where <host> is server in your case). Worked for me.

pthibault
  • 494
  • 5
  • 6
2

Try this

sshuttle -vNr user@remote-ip  0.0.0.0/0 -x remote-ip/32
aZaD
  • 21
  • 4
0

I had a similar problem, though I did not have a fatal error. Sshuttle would immediately freeze after connecting, with no error message on the client or server. It turned out my phone's hotspot VPN settings were blocking sshuttle. Not the actual VPN, but the "killswitch" setting.

I never had a problem before, but my VPN app is always updating and adding new features.

Turning off "Automatic killswitch" aka "Block connections without VPN" solved the problem. Now all my other software is working much better.

Hope that helps someone.

(Either sshuttle was the solution to my other problems, or the killswitch was affecting other software functionality as well, perhaps the latter is the more likely explanation. Glad I tried to fix sshuttle first.)

PJ Brunet
  • 3,615
  • 40
  • 37