diff --git a/server/handler/link_tun.go b/server/handler/link_tun.go index cabbb5c..67e31c6 100644 --- a/server/handler/link_tun.go +++ b/server/handler/link_tun.go @@ -45,11 +45,12 @@ func checkTun() { base.CheckModOrLoad("iptable_filter") base.CheckModOrLoad("iptable_nat") - natRule := []string{"-s", base.Cfg.Ipv4CIDR, "-o", base.Cfg.Ipv4Master, "-j", "MASQUERADE"} - forwardRule := []string{"-j", "ACCEPT"} + natRule := []string{"-s", base.Cfg.Ipv4CIDR, "-o", base.Cfg.Ipv4Master, "-m", "comment", + "--comment", "anylink tun nat", "-j", "MASQUERADE"} if natExists, _ := ipt.Exists("nat", "POSTROUTING", natRule...); !natExists { ipt.Insert("nat", "POSTROUTING", 1, natRule...) } + forwardRule := []string{"-m", "comment", "--comment", "anylink forward filter", "-j", "ACCEPT"} if forwardExists, _ := ipt.Exists("filter", "FORWARD", forwardRule...); !forwardExists { ipt.Insert("filter", "FORWARD", 1, forwardRule...) } diff --git a/version b/version index a8839f7..2bb6a82 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.11.2 \ No newline at end of file +0.11.3 \ No newline at end of file