Last active
July 26, 2025 14:04
-
-
Save lazypwny751/2faa0dfedf4f36f7ad886fb6b37756c5 to your computer and use it in GitHub Desktop.
Cloudflared service file for systemd.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=cloudflared DNS over HTTPS proxy | |
| After=network.target | |
| [Service] | |
| ExecStart=/usr/local/bin/cloudflared --config /etc/cloudflared/config.yml | |
| Restart=on-failure | |
| RestartSec=5s | |
| User=nobody | |
| CapabilityBoundingSet=CAP_NET_BIND_SERVICE | |
| AmbientCapabilities=CAP_NET_BIND_SERVICE | |
| NoNewPrivileges=true | |
| [Install] | |
| WantedBy=multi-user.target | |
| # sudo systemctl daemon-reexec | |
| # sudo systemctl daemon-reload | |
| # sudo systemctl enable cloudflared | |
| # sudo systemctl start cloudflared | |
| # sudo systemctl status cloudflared | |
| # sudo iptables -t nat -A OUTPUT -p udp --dport 53 -d 127.0.0.1 -j REDIRECT --to-ports 5053 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment