does sshuttle support tcp ping

1,477 views
Skip to first unread message

we...@pythian.com

unread,
Mar 18, 2018, 12:07:08 AM3/18/18
to sshuttle
Hi,

Does sshuttle support tcp ping?

I have a local network, all of the traffic within the network is routed to sshuttle. sshuttle is connected to a gateway application that is connected to the internet.
Within the local network, I noticed weird behavior with tcp ping (I'm using https://github.com/apaszke/tcp-ping library, but the problem happens to other tcp ping application as well).

If I do tcp-ping www.google.com 90, I expected to see a timeout error, but the connection was successful...... Why this is happening and is there a way to do tcp ping with sshuttle?

Thank you very much for your help.

Tao

Brian May

unread,
Mar 18, 2018, 12:49:07 AM3/18/18
to we...@pythian.com, sshuttle
sshuttle operates at the application layer, above the TCP/UDP which is
on top of the IP layer.

This is different from a normal VPN, which would operation at the
network/IP layer or the data link/ethernet layer.

As a result, sshuttle is the end point of the TCP connection. All
TCP connections will initially succeed. If the connection cannot be
forwarded all the way through to the destination, sshuttle will close
the TCP connection without transferring any data.

Does this make sense?
--
Brian May <br...@linuxpenguins.xyz>
https://linuxpenguins.xyz/brian/

we...@pythian.com

unread,
Mar 18, 2018, 12:54:56 AM3/18/18
to sshuttle
Hi Brian,

Thank you very much for the quick response. This does make perfect sense. :-)
Just wondering, if this is the case, and I really need to write a little utility ping application (given an ip and port, test if target service is up and running), how to write it, and how to reliable tell that target service is up and running? is there a workaround?

Thank you very much for your help.

Best Regards,
Tao

Brian May

unread,
Mar 18, 2018, 3:19:12 AM3/18/18
to we...@pythian.com, sshuttle
we...@pythian.com writes:

> Thank you very much for the quick response. This does make perfect sense.
> :-)
> Just wondering, if this is the case, and I really need to write a little
> utility ping application (given an ip and port, test if target service is
> up and running), how to write it, and how to reliable tell that target
> service is up and running? is there a workaround?

Sorry, I have no idea.

we...@pythian.com

unread,
Mar 18, 2018, 8:44:38 AM3/18/18
to sshuttle
Hi Brian,

You mentioned in your previous message that "All 

TCP connections will initially succeed. If the connection cannot be 
forwarded all the way through to the destination, sshuttle will close 
the TCP connection without transferring any data. ", 

After establishing the connection, if the connection is closed very soon, could we say that the target service doesn't exist. If the connection stays open, then, the target service does exist? Is this going to work?

Best Regards,
Tao

Brian May

unread,
Mar 18, 2018, 4:31:52 PM3/18/18
to we...@pythian.com, sshuttle
we...@pythian.com writes:

> After establishing the connection, if the connection is closed very soon,
> could we say that the target service doesn't exist. If the connection stays
> open, then, the target service does exist? Is this going to work?

Yes, that probably will work.

Note the server might also close the connection early under some
conditions (e.g. if it crashed or detected late that the connection
should not proceed for some reason). Depending on your requirements,
detecting these conditions may be desirable anyway.
Reply all
Reply to author
Forward
0 new messages