优化文档信息

This commit is contained in:
bjdgyc 2021-06-07 17:16:55 +08:00
parent 44a7a4659f
commit 4f3f22e6d3
1 changed files with 9 additions and 4 deletions

View File

@ -87,9 +87,10 @@ sudo ./anylink --conf="conf/server.toml"
[conf/server.toml](server/conf/server.toml)
## Setting
> 以下参数必须设置其中之一
网络模式选择,需要配置 `link_mode` 参数,如 `link_mode="tun"`,`link_mode="tap"` 两种参数。 不同的参数需要对服务器做相应的设置。
建议优先选择tun模式因客户端传输的是IP层数据无须进行数据转换。 tap模式是在用户态做的链路层到IP层的数据互相转换性能会有所下降。 如果需要在虚拟机内开启tap模式请确认虚拟机的网卡开启混杂模式。
@ -109,8 +110,12 @@ sudo ./anylink --conf="conf/server.toml"
2. 设置nat转发规则
```shell
# eth0为服务器内网网卡
# 请根据服务器内网网卡替换 eth0
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth0 -j MASQUERADE
# 如果执行第一个命令不生效,可以继续执行下面的命令
# iptables -A FORWARD -i eth0 -s 192.168.10.0/24 -j ACCEPT
# 查看设置是否生效
iptables -nL -t nat
```
3. 使用AnyConnect客户端连接即可