iptables异常规则/ Abnormal iptables Rules

此问题常见于Oracle和Vultr的官方系统及部分Ubuntu/ Debian系统。

  1. 当nslookup www.instagram.com成功解析出范围100.64.0.0/10的IP,但是解锁还是无法正常使用时,可通过iptables -nvL 命令检查VPS是否存在较多非用户自行设置的iptables规则。

  2. 当发现较多异常iptables规则时,可以执行以下命令修复iptables

systemctl disable ufw --now 2>/dev/null

iptables -F

iptables -X

iptables -t nat -F

iptables -t nat -X

iptables -t mangle -F

iptables -t mangle -X

iptables -P INPUT ACCEPT

iptables -P FORWARD ACCEPT

iptables -P OUTPUT ACCEPT

  1. 执行完上述命令后请重启机器

Abnormal iptables Rules Causing Unlock Failure

This issue is commonly seen on Oracle and Vultr official image, as well as some Ubuntu/Debian systems.

  1. When running

    nslookup www.instagram.com

    successfully resolves to an IP within the 100.64.0.0/10 range, but the unlocking service still doesn’t work properly, you can check whether there are excessive or user-defined iptables rules using the following command:

    iptables -nvL
  2. If you find many abnormal iptables rules, you can run the following commands to reset iptables:

    systemctl disable ufw --now 2>/dev/null  
    iptables -F  
    iptables -X  
    iptables -t nat -F  
    iptables -t nat -X  
    iptables -t mangle -F  
    iptables -t mangle -X  
    iptables -P INPUT ACCEPT  
    iptables -P FORWARD ACCEPT  
    iptables -P OUTPUT ACCEPT  
  3. After executing the above commands, please reboot your server.

Last updated