Hyper Open Edge Cloud

HowTo Get A Local IPv6 Network

How to get Ipv6 network from anywhere by using raspberry pi
  • Last Update:2020-05-04
  • Version:003
  • Language:en

By using a raspberrypi or a Linux with grandenet, we can get a local IPv6 network in everywhere.

Get A Local IPv6 Network

Most ISP in China only provide IPv4. And we do not want people in China use proxy to access Rapid.Space. Instead, we want people in China to adopt IPv6. One reliable way to get a local IPv6 network is: setup a Raspberry Pi and do some setting with grandenet. The alternative way is to use a Linux, which is explained below. Then everyone in LAN can enjoy IPv6 and access Rapid.Space. This article going to explain how to do it.

Download and Flash Raspbian Lite

First we need to download raspbian lite from here:

https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-09-30/2019-09-26-raspbian-buster-lite.zip

Update the SlapOS repository

Enter the ~/srv/runner/project/slapos directory, use git pull command to update the slapos repository:

Then extract the archive with 7z e 2019-09-26-raspbian-buster-lite.zip

Next we flash it on sdcard with sudo bash -c 'pv < 2019-09-26-raspbian-buster-lite.img > /dev/mmcblk1' (if you don't have pv, you can run sudo bash -c 'cat 2019-09-26-raspbian-buster-lite.img > /dev/mmcblk1'

Tip 1: Make sure to write in the correct disk. You can check your disk path by using df -h command.
For example, if in your machine, the sdcard is /dev/sdc. Then you need to use sudo bash -c 'pv < 2019-09-26-raspbian-buster-lite.img > /dev/sdc'.

Tip 2: The tool pv can help you to monitor the flash process. If your system didn't install it yet. On Debian like system, e.g Ubuntu, you can install it by sudo apt-get install pv. On redhat like systeam, you can install it by dnf install pv.

After that, insert the card in Raspberry Pi 3 model B and boot (default user is "pi" and password is "raspberry")

Set Raspberry Pi Network

The default user of raspberrypi is "pi" and password is "raspberry". If you are using wifi you need to set the wifi like below. Otherwise just plug the ethernet cable to the raspberrypi.

Edit /etc/network/interfaces to have (this configure IP on the ethernet and wifi)

auto wlan0
iface wlan0 inet dhcp
        wpa-ssid yourwifiname
        wpa-psk yourpassword

Install And Setup Re6st On Raspberry Pi

Download re6st(For the people not in China, please visit download re6st by this link: https://deploy.erp5.net/gnet/re6st):

wget https://deploy.erp5.cn/gnet/re6st

Then visit https://www.grandenet.cn/, get a Grandenet account by clicking "Subscribe" and fill the required information.  

TIP: When you subscribing the grandenet, don't use the Google or Facebook account, because we assume you don't have IPv6 or proxy yet.

After login in the Grandenet, in the left sidebar, there has a button "Get Freefib Token". Click it and wait 5 mins. Then refresh, you can get a token string in "Connection Parameters".

Then run the re6st command with root:

sudo FORCE=yes bash re6st

It will downloads some packages and then install re6st. Type the token you got in above when the script asks like below: 

Beware that if you want to broadcast IPv6 to every device in the same local network, you are required to type "yes" after Enable Router Advertisement [no]:.


Your token  [notoken]: [Your_token]
Enable Router Advertisement [no]: yes

 

After this done. Reboot the raspberry pi and you will see the IPv6 address from the command `ip -6 route`.

Unplug replug ethernet cable to ensure it works. 

TIP: if your forgot to put "yes" after Enable Router Advertisement [no]: you can simply rerun the command:

sudo FORCE=yes bash re6st

Don't need to type your token again, you can just type "yes" to this question.

Trouble shooting

Install and setup Re6st on a Linux

Download re6st(For the people not in China, please visit download re6st by this link: https://deploy.erp5.net/gnet/re6st):

rm -f re6st && wget https://deploy.erp5.cn/gnet/re6st

Then visit https://www.grandenet.cn/, get a Grandenet account by clicking "Subscribe" and fill the required information.  

TIP: When you subscribing the grandenet, don't use the Google or Facebook account, because we assume you don't have IPv6 or proxy yet.

After login in the Grandenet, in the left sidebar, there has a button "Get Freefib Token". Click it and wait 5 mins. Then refresh, you can get a token string in "Connection Parameters".

Then run the re6st command with root:

sudo FORCE=yes bash re6st

It will downloads some packages and then install re6st. Type the token you got in above when the script ask.

You will see the IPv6 address from the command `ip -6 route`.