How to log in to a Linux server on gray IP from an Android system with mobile Internet using ipv6

To begin with, I did not find such material on the network for beginners. In this publication I just want to describe some of the experience I have gained, however, this instruction is quite working and I am using it now.

In connection with the move to a new house, a new provider was issued, issuing only a gray IP. The benefit of NAT is not symmetrical. My modest home server based on Raspberry pi has a Debian-like system installed. I created simple household joys for myself: a torrent rocking chair and a small file cloud to upload accumulated photos via FTP. And it is absolutely natural that administering and sending photos was convenient directly from a smartphone on Android. But the gray IP deprived me of all this, and there was no static desire to at least buy a real one. Well, I had to start searching for a solution to the problem. Very quickly I came across an exit - ipv6.

In order not to describe for a long time the algorithm of my actions and searches, I will briefly tell you what exactly was done.

There are many options for connecting ipv6 on desktop systems. These include the Teredo service, 6to4, tunnel brokers. From this list for himself during the experiments established Teredo. This is such a network protocol that encapsulates and transmits ipv6 packets through ipv4. To install similar systems in the Debian environment, you need to do the following in the console:

$ sudo apt-get install miredo

After the installation is complete, your ipv6 is already configured and you can use it. To check, you can perform several actions.


$ ifconfig

In the output of the command, you will find teredo appearing among network devices. Example:

teredo Link encap: UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: 2001: 0: 58af: 53d: 233a: 3cc1: d1d8: 1831/32 Scope: Global
inet6 addr: fe80 :: ffff: ffff: ffff / 64 Scope: Link
RX packets: 448 errors: 0 dropped: 0 overruns : 0 frame: 0
TX packets: 434 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 500
RX bytes: 45434 (44.3 KiB) TX bytes: 68646 (67.0 KiB)

Your ipv6 address is 2001: 0 : 58af: 53d: 233a: 3cc1: d1d8: 1831


$ ping6

This is we ping the ipv6 version of google. Here is the attention. If the ping did not pass, then you most likely cannot use Teredo, the provider has symmetric NAT. If the ping has passed, then:


Trying to ping a server from the world inside. To do this, follow the link provided.
By pinging and receiving a positive response, you can be sure that you can again connect to your server from the outside.
Now go to Android. And here I had surprises. By default, Android is ready to work with ipv6, but the mobile network provider is not ready to let me do this. Tunnel brokers can work with any system, but not with Android. Anyway, bye. Although a broker named SixXS on the site claims that they have a couple of Android clients, they simply failed to register there, even despite the reliable data that I provided that they provided. In general, digging the net, I found happiness by stumbling upon this:

If the link stops working, then the program is called gogodroid. She works as a client for the gogo6 tunnel broker. In general, I took a chance and installed this client. True, this application required root. I have root rights, whether she will perform her tasks without these rights, I don’t know. The program opened on Android 4.4.2, its options are simple and clear. Immediately by default, you can start the client anonymously without registering with a broker. After a little thought, the client will receive his ipv6 and, in fact, you can immediately connect to your server via a mobile network. As before. By the way, for connection I use the convenient terminal client JuiceSSH.

I want to make a reservation right away. The Teredo protocol does not issue a static IP, which means that you will have to make sure that the server gives the changed IP somewhere. If anyone has any thoughts on this, please share. Maybe there is a more elegant solution for connecting a server on Linux and Android in such conditions?

Thanks for attention. Good ping to everyone.

Also popular now: