# DNS Records Configuration

## ✅ DNS Records Created

All DNS records are configured as CNAME records pointing to Cloudflare Tunnel endpoints with proxy enabled (orange cloud).

### Records

| Hostname | Type | Target | Proxied | Status |
|----------|------|--------|---------|--------|
| ml110-01.d-bis.org | CNAME | ccd7150a-9881-4b8c-a105-9b4ead6e69a2.cfargotunnel.com | ✅ Yes | ✅ Active |
| r630-01.d-bis.org | CNAME | 4481af8f-b24c-4cd3-bdd5-f562f4c97df4.cfargotunnel.com | ✅ Yes | ✅ Active |
| r630-02.d-bis.org | CNAME | 0876f12b-64d7-4927-9ab3-94cb6cf48af9.cfargotunnel.com | ✅ Yes | ✅ Active |

### Important Notes

- **All records are proxied** (orange cloud) - this enables Cloudflare's CDN, DDoS protection, and Access
- **TTL is set to 1** (auto) for fastest updates
- **CNAME records** (not A records) - required for Cloudflare Tunnel

### Verification

Check DNS records:
```bash
cd /home/intlc/projects/proxmox
source .env
curl -s -X GET "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records?name=ml110-01.d-bis.org" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" | jq '.result[]'
```

Test DNS resolution:
```bash
dig ml110-01.d-bis.org +short
dig r630-01.d-bis.org +short
dig r630-02.d-bis.org +short
```

### Update DNS Records

To update a DNS record:
```bash
# Get record ID
RECORD_ID=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records?name=ml110-01.d-bis.org" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" | jq -r '.result[0].id')

# Update record
curl -X PUT "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/dns_records/${RECORD_ID}" \
  -H "X-Auth-Email: ${CLOUDFLARE_EMAIL}" \
  -H "X-Auth-Key: ${CLOUDFLARE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"type":"CNAME","name":"ml110-01.d-bis.org","content":"ccd7150a-9881-4b8c-a105-9b4ead6e69a2.cfargotunnel.com","proxied":true,"ttl":1}'
```

