📜 ⬆️ ⬇️

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

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



In connection with the move to a new home, a new provider was received, issuing only a gray IP. The blessing of NAT is not symmetrical. A Debian-like system is installed in my humble home server based on the Raspberry pi. I created for myself simple household joys: a torrent-rocking chair and a small file cloud to upload accumulated photos via FTP. And it is absolutely natural that it was convenient to administer and send photos directly from a smartphone to Android. But the gray IP deprived me of all this, and there was no real desire to buy a real one - static or at least dynamic. Well, I had to start looking for a solution to the problem. Very quickly I came across an output - 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 myself in the course of the experiments set Teredo. This is a network protocol that encapsulates and transmits ipv6 packets via ipv4. To install similar systems in the Debian environment, do the following in the console:

$ sudo apt-get install miredo

After the installation is complete, your ipv6 is already configured and can be used. For verification, you can perform several actions.

The first


$ ifconfig

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

teredo Link encap: UNSPEC HWaddr 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
UP POINTOPOINT RUNNING NOARP MULTICAST MTU: 1280 Metric: 1
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

The second


$ ping6 ipv6.google.com

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

Third


http://www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-ping.php

We try to ping the server from the world inside. To do this, follow the link provided.
Pinging and receiving a positive response, you can be sure that you can connect to your server from the outside again.
Now go to Android. And here I started having 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 the broker under the name SixXS on say, says that they have a couple of clients for Android, they simply did not manage to register there, even despite the reliable data that I provided, which they require. In general, digging a network, I found happiness by stumbling upon it:

http://www.gogo6.com/photo/gogodroid

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

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

Thanks for attention. All good ping.

Source: https://habr.com/ru/post/253889/


All Articles