From 1bb76e5d60e891ff4c3e28d6f24edff25d9b811a Mon Sep 17 00:00:00 2001 From: bjdgyc Date: Wed, 4 Aug 2021 17:33:02 +0800 Subject: [PATCH] fix --- README.md | 3 +++ systemd/anylink.service | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c007253..053bf47 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,9 @@ sudo ./anylink 2. 设置nat转发规则 ```shell +systemctl stop firewalld.service +systemctl disable firewalld.service + # 请根据服务器内网网卡替换 eth0 iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth0 -j MASQUERADE # 如果执行第一个命令不生效,可以继续执行下面的命令 diff --git a/systemd/anylink.service b/systemd/anylink.service index 9ea8dd1..59c62d3 100644 --- a/systemd/anylink.service +++ b/systemd/anylink.service @@ -1,13 +1,15 @@ [Unit] -Description=VPN Server Service -After=network.target +Description=AnyLink Server Service +Documentation=https://github.com/bjdgyc/anylink +After=network-online.target [Service] Type=simple User=root -WorkingDirectory= /usr/local/anylink-deploy +WorkingDirectory=/usr/local/anylink-deploy Restart=on-failure RestartSec=5s -ExecStart=/usr/local/anylink-deploy/anylink --conf=conf/server.toml +ExecStart=/usr/local/anylink-deploy/anylink --conf=./conf/server.toml + [Install] WantedBy=multi-user.target