| Server IP : 216.250.13.251 / Your IP : 216.73.216.164 Web Server : nginx/1.24.0 System : Linux gunay 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/sshuttle/html/ |
Upload File : |
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>How it works — sshuttle 1.1.1 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/classic.css?v=514cf933" />
<script src="_static/documentation_options.js?v=58fbf978"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Support" href="support.html" />
<link rel="prev" title="sshuttle" href="manpage.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="support.html" title="Support"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="manpage.html" title="sshuttle"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">sshuttle 1.1.1 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">How it works</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="how-it-works">
<h1>How it works<a class="headerlink" href="#how-it-works" title="Link to this heading">¶</a></h1>
<p>sshuttle is not exactly a VPN, and not exactly port forwarding. It’s kind
of both, and kind of neither.</p>
<p>It’s like a VPN, since it can forward every port on an entire network, not
just ports you specify. Conveniently, it lets you use the “real” IP
addresses of each host rather than faking port numbers on localhost.</p>
<p>On the other hand, the way it <em>works</em> is more like ssh port forwarding than
a VPN. Normally, a VPN forwards your data one packet at a time, and
doesn’t care about individual connections; ie. it’s “stateless” with respect
to the traffic. sshuttle is the opposite of stateless; it tracks every
single connection.</p>
<p>You could compare sshuttle to something like the old <a class="reference external" href="http://en.wikipedia.org/wiki/Slirp">Slirp</a> program, which was a userspace TCP/IP
implementation that did something similar. But it operated on a
packet-by-packet basis on the client side, reassembling the packets on the
server side. That worked okay back in the “real live serial port” days,
because serial ports had predictable latency and buffering.</p>
<p>But you can’t safely just forward TCP packets over a TCP session (like ssh),
because TCP’s performance depends fundamentally on packet loss; it
<em>must</em> experience packet loss in order to know when to slow down! At
the same time, the outer TCP session (ssh, in this case) is a reliable
transport, which means that what you forward through the tunnel <em>never</em>
experiences packet loss. The ssh session itself experiences packet loss, of
course, but TCP fixes it up and ssh (and thus you) never know the
difference. But neither does your inner TCP session, and extremely screwy
performance ensues.</p>
<p>sshuttle assembles the TCP stream locally, multiplexes it statefully over
an ssh session, and disassembles it back into packets at the other end. So
it never ends up doing TCP-over-TCP. It’s just data-over-TCP, which is
safe.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="manpage.html"
title="previous chapter">sshuttle</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="support.html"
title="next chapter">Support</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/how-it-works.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="support.html" title="Support"
>next</a> |</li>
<li class="right" >
<a href="manpage.html" title="sshuttle"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">sshuttle 1.1.1 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href="">How it works</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2024, Brian May.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
</div>
</body>
</html>