What is a Cloudflare Argo Tunnel Argo Tunnel provides a secure way to expose web servers to the Internet without opening firewall ports or configuring ACLs. Argo Tunnel also ensures that requests are routed through Cloudflare before reaching your origin web server, ensuring that attack traffic is stopped by Cloudflare’s WAF and Unmetered DDoS mitigation, and can be authenticated through Access if enabled on the account.
Why use Argo instead of a normal CDN? Because using a CDN requires opening port 60000 in the security group, and leaks the IP address of the C&C server, increasing the risk of being traced back. With ArgoTunnel, there’s no need to open the backend port. Plus you get an official Cloudflare certificate.
Also, Cloudflare now routes through the Hong Kong node by default, so access from mainland China isn’t slow either.
Why did I go this route? Actually, at first I just wanted to hide the panel, so I used the host to install nginx as a reverse proxy, but it was too much hassle. Eventually I remembered that Argo can avoid opening ports, bind a domain, and hide the address, so I jumped on Argo right away.
Configuring VIPER
Because viper uses a self-signed certificate, forwarding directly to https://127.0.0.1:60000 won’t work—it will throw a certificate error. So first you need to enter the container to modify the nginx config, turn off SSL, and switch to http.
docker ps #Check container namedocker exec -i -t viper-c /bin/bash#The following operations are inside the containercd /root/viper/Docker/nano viper.confUse Ctrl+Shift+_ to jump to line 7.
.......server { include /root/viper/Docker/nginxconfig/viper.conf; ssl off; #Change this from on to off ssl_certificate /root/viper/Docker/nginxconfig/server.crt;.......Finally, remember to reload nginx’s config so the changes take effect.
nginx -s reloadexit #Exit the containerConfiguring Argo
Installation
Cloudflared is the software that connects your origin server to the Cloudflare Argo Server.
You can refer to the documentation here.
Official documentation Docs
Github Release Downloads
Configuring the Tunnel
cloudflared tunnel login #First log in, and select the example.com domaincloudflared tunnel create vipercloudflared tunnel route dns viper vip #Through the vip tunnel, automatically add a CNAME record pointing to vip.example.com in CloudflareVerifying the Tunnel Configuration
Start the tunnel to test it. If there are no problems, continue.
cloudflared tunnel --name viper --url http://127.0.0.1:60000Then you can visit vip.example.com to check the result. If there are no problems, continue. Starting the tunnel this way is only a temporary measure, so we need to make it persistent.
Making Argo Persistent
First run cloudflared tunnel list to note down the Tunnel ID.
sudo cloudflared service installnano /etc/cloudflared/config.ymlWrite it as follows, changing whatever needs changing
tunnel: <Tunnel-UUID>credentials-file: /root/.cloudflared/<Tunnel-UUID>.json
ingress: - hostname: vip.example.com service: http://127.0.0.1:60000 - service: http_status:404Restart the cloudflared service
sudo systemctl restart cloudflared && sudo systemctl enable cloudflared