Sunday, July 8, 2012

If both computers are behind NAT

Writing of this article prompted some comments on a recent article, " Not too delicate way of selling software "about TeamViewer. I'll try to briefly describe a not too complicated, and at the same time, a fairly universal way to "go" from one computer to another if they both are NAT.
Actually, to the point. In order to establish a connection, each computer will create IPv6-tunnel with a service tunnel IPv6. Both computers at the same time receive a full IPv6 address, and among them will be to connect to ssh, vnc or other technology. Of course, if both computers already have an IPv6 address, your ISP, no body movement to raise the tunnels to produce not needed. Unfortunately, the vast majority of providers to IPv6 is not ready and that the user has direct access to the Internet to IPv6 - a rarity.
The most famous service tunnel IPv6, perhaps, is this one from Hurricane Electric. To raise the tunnel need to be registered, to get an IPv6 network and skopipastit commands for your system from a browser to the console.
Is there an easier way to raise the tunnel, using the service tunnel freenet6 . Service provides anonymous access (you can not register). To raise the IPv6-tunnel should download and run the example program from their site. For my kubuntu it was already in the repository:
sudo apt-get install gogoc

gogoc startup connects to the server and configures the IPv6-tunnel. That's what it looks like I have:
$ sudo ifconfig ... tun Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet6 addr: 2001:5c0:1400:a::45f/128 Scope:Global UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1280 Metric:1 RX packets:7824 errors:0 dropped:0 overruns:0 frame:0 TX packets:5269 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:5057840 (5.0 MB) TX bytes:771574 (771.5 KB) ... $ sudo ip -6 route show 2001:5c0:1400:a::6a1 dev tun proto kernel metric 256 mtu 1280 2000::/3 dev tun metric 1 fe80::/64 dev tun proto kernel metric 256 default dev tun metric 1 ...
2001:5 c0: 1400: a :: 45f - IPv6 address given to me Freenet6.
After doing a similar procedure on the second machine, you can "go" from one to another.
$ Ssh user @ 2001:5 c0: 1400: a :: 45f

I’m selfish, impatient and a little insecure. I make mistakes, I am out of control and at many times hard to handle. But if you can’t handle me at my worst, then i'm sure as hell that you don’t deserve me at my best.


EmoticonEmoticon