2

I'm tunneling all of my internet traffic through a remote computer hosting Debian using sshd. But my internet connection becomes so slow (something around 5 to 10 kbps!). Can be anything wrong with the default configuration to cause this problem?

Thanks in advance,

Saba Jamalian
  • 750
  • 2
  • 10
  • 24

2 Answers2

3

Yes, tunelling traffic over tcp connection is not a good idea. See http://sites.inka.de/bigred/devel/tcp-tcp.html

Michael Krelin - hacker
  • 138,757
  • 24
  • 193
  • 173
3

Tunneling TCP within another TCP stream can sometimes work -- but when things go wrong, they go wrong very quickly.

Consider what happens when the "real world" loses one of your TCP packets: after a certain amount of not getting an ACK packet back in response to new data packets, the sending side realizes a packet has gone missing and re-sends the data.

If that packet happens to be a TCP packet whose payload is another TCP packet, then you have two TCP stacks that are upset about their missing packet. The tunneled TCP layer will re-send packets and the outer TCP layer will also resend packets. This causes a giant pileup of duplicate packets that will eventually be delivered and must be dropped on the floor -- because the outer TCP reliably delivered the packet, eventually.

I believe you would be much better served by a more dedicated tunneling method such as GRE tunnels or IPSec.

sarnold
  • 102,305
  • 22
  • 181
  • 238