Amazon-Web-Services

如何通過 CLI 重啟 OpenVPN 訪問伺服器?

  • October 13, 2021

我正在使用 AWS 的“OpenVPN 訪問伺服器”AMI EC2 實例。

根據https://forums.openvpn.net/viewtopic.php?p=12848#p12848 /etc/init.d/openvpn restart應該在 Debian 上重新啟動 OpenVPN 伺服器(我正在執行 Ubuntu,這是 Debian)但是當我嘗試得到這個時:

bash: /etc/init.d/openvpn: No such file or directory

當我這樣做時service openvpn restart(根據上面的文章,它應該在 CentOS 上工作)我得到這個:

Failed to restart openvpn.service: Unit openvpn.service not found.

我做了,locate openvpn但每次收到 3,860 個條目locate openvpn | wc -l

如果有幫助,這是我登錄時看到的橫幅:

Welcome to OpenVPN Access Server Appliance 2.7.5

 System information as of Tue Oct 12 06:00:15 UTC 2021

 System load:  0.0               Users logged in:      0
 Usage of /:   75.6% of 7.69GB   IP address for eth0:  172.31.7.187
 Memory usage: 42%               IP address for as0t0: 172.27.224.1
 Swap usage:   0%                IP address for as0t1: 172.27.232.1
 Processes:    103

Last login: Tue Oct 12 04:04:04 2021 from 70.124.147.35

那麼如何重啟 OpenVPN 訪問伺服器呢?

我想我可以重新啟動伺服器,但是有沒有辦法在不重新啟動整個機器的情況下重新啟動 OpenVPN 訪問伺服器?

service openvpnas restart成功了

引用自:https://serverfault.com/questions/1080264