Files
dns-updater/README.md

45 lines
1.2 KiB
Markdown

# Omada Custom Dynamic DNS for Mail-In-A-Box
The repository contains a Flask-based API proxy that allows Omada controller to update DNS records in a Mail-In-A-Box (MIAB) server. The Omada SDN software does not natively support MIAB as a Dynamic DNS provider, so this proxy bridges that gap.
## Features
- Provides endpoints for listing, setting, and deleting DNS records.
- Relays authentication credentials from Omada supplied username and password to MIAB.
## Requirements
- Python 3.x
- Flask
- Flask-HTTPAuth
- Requests
- Base64
## Installation
On an Ubuntu/Debian system, you can install the required packages using apt:
```bash
sudo apt install -y python3 python3-dotenv python3-flask python3-flask-httpauth python3-requests
```
Copy the `app.py` file to your desired location, and run it using Python:
```bash
flask run app.py
```
## Self-Signed SSL Certificate (Optional)
To run the Flask app with HTTPS, you can create a self-signed SSL certificate:
```bash
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"
```
Then run the Flask app with SSL context:
```bash
flask run --cert=cert.pem --key=key.pem
```