Update Cloudflared configuration and documentation

Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
Raghav
2026-04-19 05:50:24 +05:30
parent c37af441a9
commit f262c01534
3 changed files with 22 additions and 3 deletions

View File

@ -2,7 +2,7 @@
## Architecture
- OpenVPN server listens locally on TCP `1194`
- Cloudflare Tunnel ingress routes `vpn.bhatfamily.in` to `tcp://localhost:1194`
- Cloudflare Tunnel ingress routes `vpn.bhatfamily.in` to `tcp://127.0.0.1:1194`
- Clients connect through local `cloudflared access tcp` forwarding, then OpenVPN to localhost
## Service and Config Locations
@ -32,12 +32,22 @@ Expected key settings in `/etc/openvpn/server/server.conf`:
## Cloudflared Ingress Baseline
Expected entries in `/etc/cloudflared/config.yml`:
- `vpn.bhatfamily.in -> tcp://localhost:1194`
- `vpn.bhatfamily.in -> tcp://127.0.0.1:1194`
- Existing routes:
- `web.bhatfamily.in -> http://localhost:8080`
- `ecom.bhatfamily.in -> http://localhost:8081`
- `ssh.bhatfamily.in -> ssh://localhost:22`
## DNS Route Baseline
Expected DNS route for this tunnel:
- `vpn.bhatfamily.in CNAME 6a2e99c2-ce2c-49a9-a3f2-8bf1ad3073b0.cfargotunnel.com`
Repair/verify commands:
```bash
cloudflared tunnel route dns --overwrite-dns 6a2e99c2-ce2c-49a9-a3f2-8bf1ad3073b0 vpn.bhatfamily.in
dig +short vpn.bhatfamily.in CNAME
```
## Firewall / Routing (UFW)
Expected system settings for VPN egress:
- `/etc/default/ufw`
@ -100,3 +110,4 @@ sudo journalctl --no-pager -u cloudflared -n 120
- `cloudflared access tcp --url localhost:1194` may fail with `address already in use` if local OpenVPN server is already bound to `1194` on that machine.
- Use another local forwarder port (e.g. `21194`) and set OpenVPN client `remote 127.0.0.1 21194`.
- `vpn.bhatfamily.in:21194` is not meant to be publicly reachable; it is client-local forwarding endpoint semantics.
- If DNS resolves to `bhatfamily.in` (or any non-`cfargotunnel.com` CNAME), Cloudflare will not route traffic to this tunnel; repair the DNS route with `cloudflared tunnel route dns`.