mirror of https://github.com/bjdgyc/anylink.git
优化文档信息
This commit is contained in:
parent
44a7a4659f
commit
4f3f22e6d3
|
@ -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客户端连接即可
|
||||
|
|
Loading…
Reference in New Issue