24 July 2018

GCE

VM settings:

  • OS: Ubuntu 16.04.4 LTS
  • zone: asia-northeast1-b
  • internal IP: use static IP
  • external IP: use static IP
  • copy my own .ssh/id_rsa.pub to SSH Keys section

In VPC Network->Firewall rules, add shadowsocks rule:

  • IP ranges: 0.0.0.0/0
  • Protocols and ports: tcp:9999

After the setup, using ssh in a terminal should be able to connect to the VMN.

Use How do I fix my locale issue? to remove the following warning:

WARNING! Your environment specifies an invalid locale.
 The unknown environment variables are:
   LC_CTYPE=UTF-8 LC_ALL=
 This can affect your user experience significantly, including the
 ability to manage packages. You may install the locales by running:

   sudo apt-get install language-pack-UTF-8
     or
   sudo locale-gen UTF-8

Shadowsocks

Installation

Install shadowsocks-python:

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
sudo ./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log

BBR

Add the following content to sysctl -p:

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

Enable the configuration:

$ sudo sysctl -p

Verify that BBR is working:

$ lsmod | grep bbr
tcp_bbr                20480  0