bjdgyc / anylink

AnyLink是一个企业级远程办公 ssl vpn 软件,可以支持多人同时在线使用。基于 openconnect 协议开发,并且借鉴了 ocserv 的开发思路,可以完全兼容 AnyConnect 客户端。
GNU Affero General Public License v3.0
1.56k stars 375 forks source link

docker启动不会自动修改转发 #89

Closed lihaiz closed 4 months ago

lihaiz commented 2 years ago

官方原配置文件为:

客户端分配的ip地址池

ipv4_master = "eth0" ipv4_cidr = "192.168.10.0/24" 当改为:

客户端分配的ip地址池

ipv4_master = "eth0" ipv4_cidr = "192.168.100.0/24" 的时候,启动docker, 默认的转发还是 MASQUERADE all -- 192.168.10.0/24 0.0.0.0/0 希望后续能修正为自动根据这个网段自动修改转发

bjdgyc commented 2 years ago

docker 启动的时候 可以通过环境变量设置

-e IPV4_CIDR=192.168.10.0/24

lihaiz commented 2 years ago

嗯,希望能自动根据server.toml去生效,这样通过配置文件就可以生效会更好

taiwan-king commented 4 months ago

2024/03/18 22:29:15 link_tun.go:55: [Error] running [/sbin/iptables -t nat -I POSTROUTING 1 -s 192.168.10.0/24 -o eth0 -m comment --comment AnyLink -j MASQUERADE --wait]: exit status 1: Warning: Extension comment revision 0 not supported, missing kernel module? iptables: No chain/target/match by that name.

開機自動設定NAT沒有生效變成每次重開機都要自己設定

-e IPV4_CIDR=192.168.10.0/24 測試過沒用

bjdgyc commented 4 months ago

@taiwan-king 麻烦发下 系统版本,系统架构,系统内核,anylink版本,iptables 版本

taiwan-king commented 4 months ago

@taiwan-king 麻烦发下 系统版本,系统架构,系统内核,anylink版本,iptables 版本

synology NAS DS1621+ DSM7.2

1710930645946

1710930631846

1710930726120

bjdgyc commented 4 months ago

在宿主机执行 modprobe xt_comment 并且开启docker的特权模式运行 anylink

使用 v0.11.4 测试一下

taiwan-king commented 4 months ago

在宿主机执行 modprobe xt_comment 并且开启docker的特权模式运行 anylink

使用 v0.11.4 测试一下

感謝您的快速處理, 更新新版本即正常使用不需要特別去宿主機安裝xt_comment