Skip to content

Commit

Permalink
chore: update issue templates (#103)
Browse files Browse the repository at this point in the history
* chore: update issue templates

* chore: create faq

* chore: bump version
  • Loading branch information
willswire authored Dec 31, 2024
1 parent 3701f8a commit 55c5a4b
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 44 deletions.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Triage confirmation**
Please confirm that you have completed the following:
- [ ] I have checked the FAQ in `/docs/faq.md` and confirmed my issue is not already documented
- [ ] I have opened a discussion for review and no community support has fixed my issue

**Describe the problem**
A clear and concise description of what the problem is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**UniFi information (please complete the following information):**
- Device: [e.g. UDM Pro]
- OS Version: [e.g. 9.0.108]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
35 changes: 1 addition & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ A Cloudflare Worker script that enables UniFi devices (e.g., UDM-Pro, USG) to dy

UniFi devices do not natively support Cloudflare as a DDNS provider. This script bridges that gap, allowing your UniFi device to keep your DNS records updated with your public IP address.

---

## 🚀 **Setup Overview**

### 1. **Deploy the Cloudflare Worker**
Expand All @@ -34,8 +32,6 @@ UniFi devices do not natively support Cloudflare as a DDNS provider. This script
```
4. Note the `*.workers.dev` route.

---

### 2. **Generate a Cloudflare API Token**

1. Go to the [Cloudflare Dashboard](https://dash.cloudflare.com/).
Expand All @@ -44,8 +40,6 @@ UniFi devices do not natively support Cloudflare as a DDNS provider. This script
4. Scope the token to **one** specific zone.
5. Save the token securely.

---

### 3. **Configure UniFi OS**

1. Log in to your [UniFi OS Controller](https://unifi.ui.com/).
Expand All @@ -58,33 +52,6 @@ UniFi devices do not natively support Cloudflare as a DDNS provider. This script
- **Server:** `<worker-name>.<worker-subdomain>.workers.dev/update?ip=%i&hostname=%h`
*(Omit `https://`)*

---

## 🛠️ **Testing & Troubleshooting**

### **UDM-Pro Testing**
1. SSH into your UDM-Pro.
2. Run:
```sh
ps aux | grep inadyn
inadyn -n -1 --force -f /run/ddns-eth4-inadyn.conf
```
3. Check `/var/log/messages` for errors.

### **USG Testing**
1. SSH into your USG.
2. Run:
```sh
sudo ddclient -daemon=0 -verbose -noquiet -debug -file /etc/ddclient/ddclient_eth0.conf
```
3. Look for `SUCCESS` in the output.

---

## ⚠️ **Important Notes**

- Updates occur approximately every two minutes. You can tail the worker logs to validate updates from your UniFi device.
- For **subdomains** (`sub.example.com`), manually create an A record in Cloudflare first.
- Remove `https://` from the **Server** field.
- **Wildcard domains:** Use `*.example.com` in the **Hostname** field.
- UniFi OS may require recreating DDNS entries instead of editing them.
Using this script with various Ubiquiti devices and different UniFi software versions can introduce unique challenges. If you encounter issues, start by checking the FAQ in `/docs/faq.md`. If you don’t find a solution, you can ask a question on the [discussions page](https://github.com/willswire/unifi-ddns/discussions/new?category=q-a). If the problem persists, please raise an issue [here](https://github.com/willswire/unifi-ddns/issues).
14 changes: 7 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We actively support and provide security updates for the following versions of o

| **Version** | **Supported** |
| ----------- | ------------------ |
| **3.0.0** | ✅ Supported |
| **3.0.x** | ✅ Supported |
| **< 3.0** | ❌ Not Supported |

If you're using an unsupported version, we recommend upgrading to a supported version as soon as possible to ensure the security and stability of your system.
Expand All @@ -15,20 +15,20 @@ If you're using an unsupported version, we recommend upgrading to a supported ve

## **Reporting a Vulnerability**

We take security vulnerabilities seriously and appreciate your efforts to disclose them responsibly.
We take security vulnerabilities seriously and appreciate your efforts to disclose them responsibly.

### **How to Report:**
- Please report any security vulnerabilities via **[[email protected]](mailto:[email protected])**.
- Please report any security vulnerabilities via **[[email protected]](mailto:[email protected])**.
- Include as much detail as possible, such as steps to reproduce, potential impact, and any relevant logs or information.

### **What to Expect:**
1. **Acknowledgment:** You'll receive a confirmation within **30 days** that your report has been received.
2. **Assessment:** Our security team will investigate and validate the vulnerability.
3. **Updates:** You'll receive periodic updates on the status of the vulnerability investigation.
1. **Acknowledgment:** You'll receive a confirmation within **30 days** that your report has been received.
2. **Assessment:** Our security team will investigate and validate the vulnerability.
3. **Updates:** You'll receive periodic updates on the status of the vulnerability investigation.
4. **Resolution:** Once addressed, we'll notify you and credit you (if applicable) in the release notes.

### **Public Disclosure:**
- We aim to resolve critical vulnerabilities within **30 days** of acknowledgment.
- We aim to resolve critical vulnerabilities within **30 days** of acknowledgment.
- Once fixed, details of the vulnerability will be disclosed in our security advisories.

Thank you for helping keep our project secure! 🚀
113 changes: 113 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Frequently Asked Questions

This FAQ addresses common issues and solutions for configuring UniFi devices to update Cloudflare DNS records using DDNS, based on discussions from [issues](https://github.com/willswire/unifi-ddns/issues/) and [discussions](https://github.com/willswire/unifi-ddns/discussions).

## 1. What is the correct server configuration for UniFi devices when using Cloudflare DDNS?

The server configuration depends on your UniFi device model:

- **Older Gateways (e.g., USG, USG Pro):**
- **Server:** `unifi-cloudflare-ddns.<your_worker_subdomain>.workers.dev`
- **Note:** Do **not** include the path with variables.

- **Newer Gateways (e.g., UDM series, UXG series):**
- **Server:** `unifi-cloudflare-ddns.<your_worker_subdomain>.workers.dev/update?ip=%i&hostname=%h`
- **Note:** Include the full path with variables.

This distinction is crucial to ensure the DDNS updates function correctly.

## 2. How do I configure DDNS on my UniFi device?

1. **Access UniFi Controller:**
- Navigate to **Settings** > **Internet** > **WAN** > **Dynamic DNS**.

2. **Create New Dynamic DNS Entry:**
- **Service:** Select `custom`.
- **Hostname:** Enter your desired hostname (e.g., `subdomain.example.com`).
- **Username:** Enter your Cloudflare account email.
- **Password:** Enter your Cloudflare API token.
- **Server:** Enter the appropriate server address based on your device model (see FAQ #1).

3. **Save Configuration:**
- Click **Save** to apply the settings.

## 3. How should I format the server field when configuring DDNS on my UniFi device?

Remove `https://` from the **Server** field before inputting the server address.

## 4. What should I do if I encounter the error: "Failed to find zone '%h/nic/update?system=dyndns'"?

This error typically occurs due to incorrect server configuration. Ensure that:

- For **older gateways**, the server field contains only the FQDN without the path.
- For **newer gateways**, the server field includes the full path with variables.

Double-check your device model and adjust the server configuration accordingly.

## 5. How can I verify if my DDNS configuration is working correctly?

For **UDM-Pro** devices:

1. **SSH into your UDM-Pro:**
- Use an SSH client to access your device.

2. **Run the following command:**
```bash
ps aux | grep inadyn
inadyn -n -1 --force -f /run/ddns-eth4-inadyn.conf
```

3. **Check Logs:**
- Review `/var/log/messages` for any errors or confirmation messages indicating successful updates.

For **USG** devices:

1. **SSH into your USG:**
- Use an SSH client to access your device.

2. **Run the following command:**
```bash
sudo ddclient -daemon=0 -verbose -noquiet -debug -file /etc/ddclient/ddclient_eth0.conf
```

3. **Check Output:**
- Look for `SUCCESS` messages indicating that the DDNS update was successful.

## 6. Do I need to pre-create DNS records in Cloudflare before configuring DDNS on my UniFi device?

Yes, for subdomains (e.g., `sub.example.com`), you should manually create an A record in Cloudflare before configuring DDNS on your UniFi device.

## 7. How do I configure DDNS for wildcard domains in Cloudflare?

For wildcard domains, use `*.example.com` in the **Hostname** field when setting up DDNS in your UniFi device.

## 8. What permissions are required for the Cloudflare API token used in DDNS configuration?

The User API token should have the following permissions:

- **Zone:**
- **Read**
- **DNS Edit**

Ensure the token is scoped to only one specific zone (domain) you intend to update.

## 9. How frequently does the UniFi device update the DDNS record?

UniFi devices typically check for IP changes and update DDNS records approximately every two minutes.

## 10. How can I configure DDNS for dual WAN setups on my UniFi device?

In dual WAN configurations, UniFi devices may not natively support configuring DDNS for both WAN interfaces simultaneously. To manage DDNS updates for both connections **use different DDNS providers**.

Assign separate DDNS providers to each WAN interface if supported. Using the `custom` DDNS provider for one WAN connection and `dyndns` for the other is recommended.

## 11. What should I do if I continue to experience issues with DDNS updates?

- **Verify Configuration:**
- Double-check all entries in your DDNS settings for accuracy.

- **Check Logs:**
- Review system logs on your UniFi device for error messages.

- **Seek Community Assistance:**
- Engage with the community by posting issues or questions on relevant GitHub repositories or forums.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unifi-ddns",
"version": "3.0.0",
"version": "3.0.1",
"private": true,
"scripts": {
"deploy": "wrangler deploy",
Expand Down

0 comments on commit 55c5a4b

Please sign in to comment.