i am wondering how to tunnel tcp/ipv6 traffic over the ssh/ipv4 tunnel (ptp connection). Is it possible? How can i achieve that?
feedback
|
migrated from stackoverflow.com Feb 23 '11 at 12:15
This question came from our site for professional and enthusiast programmers.
|
Yes, it is possible and not too difficult, but the solution is very suboptimal, since SSH runs over TCP and has a sensible overhead. The server must have in its configuration file
Then, you need to be root on both machines. You connect to the server using:
After connection, use the command On the server:
On the client:
This is enough so that you can ping the other side through the tunnel, if there is no firewall rule blocking. The next step is to set routes over the tunnel (don't forget net.ipv6.conf.default.forwarding=1), and then adjust the link MTU to get optimal performance.
This will allow your client to ping other networks that the server has access to, given that the targets have routes back to your remote client. You'll also have to fix the link MTU so that the client doesn't send packets that the server won't be able to transmit forward. This depends on the MTU of the IPv6 link of the server itself. Do not rely on path MTU discovery since it won't work correctly over the SSH tunnel. If in doubt, start with a low MTU value, like 1280 (minimum MTU allowed for IPv6). | |||||
feedback
|