The server I have in my local network cannot access api.telegram.org, the problem was solved instantly after I disabled IPv6 in router.

The proxy only works in IPv4 protocol, but the server prefer to use IPv6 so the requests were blocked by the GFW.

Environment

  • Ubuntu 18.04 Server

Disable instantly

Execute command

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Disable permanently

  1. Modify the grub file located in /etc/default
    # change GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX to
    GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1" 
    GRUB_CMDLINE_LINUX="ipv6.disable=1"
  2. update grub
    sudo update-grub 
    #reboot to take affect
    sudo reboot

     

环境

  • Ubuntu 16.04
  • Bandwagon Host VPS(需要根据主机商的设置来配置ipv6,bwg的默认设置修改起来比较简单)

步骤

  1. Hurricane Electric Free IPv6 Tunnel Broker注册账号,申请IPv6 Tunnel
    1. 点击左侧“Register”,注册账号。
    2. 登陆后点击左侧“Create Regular Tunnel”,输入VPS的IPv4地址,注意选择正确的地区,最后提交。
    3. 申请完成后会自动跳转到Tunnel Details页面,然后选择“Example Configurations”。在选择OS处选择对应的操作系统,之后下方的文本框会出现对应的配置语句。
  2. 复制配置语句,将其粘贴在 /etc/network/interfaces 中。
    • 这一步请根据自己的情况更改配置,HE给出的配置仅供参考。Alpharacks的VPS无法使用这里的默认配置。
  3. 重启networking
    service networking restart

测试

使用ping6指令ping google,可以ping通代表配置成功。