A custom web-based GUI for managing Azure DNS zones. This application provides a modern, user-friendly interface to view, add, edit, and delete DNS records using Azure Service Principal authentication.
- π View all DNS records in a specific Azure DNS zone
- β Add new DNS records (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV)
- βοΈ Edit existing DNS records
- ποΈ Delete DNS records
- π Secure authentication using Azure Service Principal
- βοΈ Web-based configuration management
- π¨ Modern, responsive web interface with dark mode
- π Advanced search and filtering by record type
- β‘ Real-time updates without page refresh
- π³ Docker support for easy deployment
Modern gradient header with glassmorphism effects, dynamic type filters, and responsive table layout.
Beautiful dark theme with optimized colors and smooth transitions.
The easiest way to run Azure DNS Manager is using Docker:
docker run -d -p 5000:5000 \
-e AZURE_TENANT_ID=your-tenant-id \
-e AZURE_CLIENT_ID=your-client-id \
-e AZURE_CLIENT_SECRET=your-client-secret \
-e AZURE_SUBSCRIPTION_ID=your-subscription-id \
-e AZURE_RESOURCE_GROUP=your-resource-group \
-e AZURE_DNS_ZONE=your-dns-zone.com \
--name azure-dns-manager \
yourusername/azure-dns-manager:latestThen open http://localhost:5000 in your browser.
- Backend: Python Flask REST API using Azure SDK for Python
- Frontend: Vanilla HTML/CSS/JavaScript
- Authentication: Azure Service Principal (Client Credentials)
- Azure SDK: Direct DNS management via Azure Management APIs
- Python 3.11 or higher (for local development)
- Docker (optional, for containerized deployment)
- Azure Subscription with a DNS Zone
- Azure Service Principal with appropriate permissions:
- DNS Zone Contributor role on the DNS zone
- Or custom role with permissions:
Microsoft.Network/dnszones/*
# Pull the latest image
docker pull yourusername/azure-dns-manager:latest
# Run with environment variables
docker run -d \
--name azure-dns-manager \
-p 5000:5000 \
-e AZURE_TENANT_ID=your-tenant-id \
-e AZURE_CLIENT_ID=your-client-id \
-e AZURE_CLIENT_SECRET=your-client-secret \
-e AZURE_SUBSCRIPTION_ID=your-subscription-id \
-e AZURE_RESOURCE_GROUP=your-resource-group \
-e AZURE_DNS_ZONE=your-dns-zone.com \
yourusername/azure-dns-manager:latest
# Or use a .env file
docker run -d \
--name azure-dns-manager \
-p 5000:5000 \
--env-file .env \
yourusername/azure-dns-manager:latest# Clone the repository
git clone https://github.com/yourusername/azure-dns-alternative-gui.git
cd azure-dns-alternative-gui
# Build the image
docker build -t azure-dns-manager .
# Run the container
docker run -d -p 5000:5000 --env-file .env azure-dns-managerCreate a docker-compose.yml:
version: '3.8'
services:
azure-dns-manager:
image: yourusername/azure-dns-manager:latest
container_name: azure-dns-manager
ports:
- "5000:5000"
environment:
- AZURE_TENANT_ID=${AZURE_TENANT_ID}
- AZURE_CLIENT_ID=${AZURE_CLIENT_ID}
- AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET}
- AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}
- AZURE_RESOURCE_GROUP=${AZURE_RESOURCE_GROUP}
- AZURE_DNS_ZONE=${AZURE_DNS_ZONE}
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:5000/api/health')"]
interval: 30s
timeout: 10s
retries: 3Then run:
docker-compose up -dgit clone https://github.com/yourusername/azure-dns-alternative-gui.git
cd azure-dns-alternative-guipip install -r requirements.txtIf you don't have a Service Principal yet, create one:
# Login to Azure
az login
# Create a Service Principal
az ad sp create-for-rbac --name "dns-manager-sp" --role "DNS Zone Contributor" --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Network/dnszones/{dns-zone-name}This command will output:
{
"appId": "your-client-id",
"displayName": "dns-manager-sp",
"password": "your-client-secret",
"tenant": "your-tenant-id"
}Copy the example environment file and fill in your Azure credentials:
cp .env.example .envEdit .env with your values:
# Azure Service Principal Credentials
AZURE_TENANT_ID=your-tenant-id-here
AZURE_CLIENT_ID=your-client-id-here
AZURE_CLIENT_SECRET=your-client-secret-here
# Azure DNS Configuration
AZURE_SUBSCRIPTION_ID=your-subscription-id-here
AZURE_RESOURCE_GROUP=your-resource-group-here
AZURE_DNS_ZONE=your-dns-zone.comImportant: Never commit the .env file to version control!
python app.pyThe application will start on http://localhost:5000
Open your web browser and navigate to:
http://localhost:5000
When you first access the application:
- If Azure credentials are not configured, you'll be automatically redirected to the Settings page
- Enter your Azure Service Principal credentials:
- Tenant ID
- Client ID
- Client Secret
- Subscription ID
- Resource Group
- DNS Zone name
- Click Test Connection to verify your credentials
- Click Save Configuration to persist the settings
- You'll be redirected to the main page with your DNS records
To update your Azure credentials later:
- Click the βοΈ Settings button in the header
- Update the required fields
- Test and save the new configuration
All configuration can be provided via environment variables (useful for Docker):
AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_CLIENT_SECRET=your-client-secret
AZURE_SUBSCRIPTION_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_RESOURCE_GROUP=your-resource-group
AZURE_DNS_ZONE=your-domain.comThe main page displays all DNS records in your configured zone in a table format showing:
- Record name and FQDN
- Record type (A, AAAA, CNAME, MX, TXT, etc.)
- TTL (Time To Live)
- Record values
-
Fill in the "Add New DNS Record" form:
- Record Name: Enter the subdomain name (e.g.,
www,mail) or@for the root domain - Record Type: Select from A, AAAA, CNAME, MX, or TXT
- TTL: Set Time To Live in seconds (default: 3600)
- Values: Enter record values (one per line)
- For A records: IP addresses (e.g.,
192.168.1.1) - For CNAME: Target domain (e.g.,
target.example.com) - For MX: Priority and exchange (e.g.,
10 mail.example.com) - For TXT: Text values (e.g.,
v=spf1 include:_spf.google.com ~all)
- For A records: IP addresses (e.g.,
- Record Name: Enter the subdomain name (e.g.,
-
Click "Add Record"
- Click the "βοΈ Edit" button next to any record
- Modify the TTL or values in the modal dialog
- Click "Update Record"
- Click the "ποΈ Delete" button next to any record
- Confirm the deletion in the dialog
Click the "π Refresh" button in the header to reload all records from Azure.
The backend provides the following REST API endpoints:
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Health check and zone info |
| GET | /api/config/status |
Check if configuration is complete |
| GET | /api/config |
Get current configuration |
| POST | /api/config |
Save configuration |
| POST | /api/config/test |
Test Azure credentials |
| GET | /api/records |
List all DNS records |
| POST | /api/records |
Create a new DNS record |
| PUT | /api/records/<type>/<name> |
Update a DNS record |
| DELETE | /api/records/<type>/<name> |
Delete a DNS record |
This project includes automated Docker image building and publishing via GitHub Actions.
-
Create Docker Hub Account if you don't have one
-
Generate Docker Hub Access Token:
- Go to Docker Hub β Account Settings β Security
- Click "New Access Token"
- Copy the token
-
Add GitHub Secrets: Go to your GitHub repository β Settings β Secrets and variables β Actions
Add the following secrets:
DOCKERHUB_USERNAME: Your Docker Hub usernameDOCKERHUB_TOKEN: Your Docker Hub access token
-
Create and Push a Version Tag:
git tag v1.0.0 git push origin v1.0.0
-
Automated Build: The GitHub Actions workflow will:
- Build the Docker image for multiple platforms (amd64, arm64)
- Tag it with the version number and
latest - Push to Docker Hub
- Create a GitHub release with Docker instructions
# Create a new version tag
git tag -a v1.2.3 -m "Release version 1.2.3"
# Push the tag to trigger the CI/CD pipeline
git push origin v1.2.3The pipeline will automatically:
- Build multi-platform Docker images (linux/amd64, linux/arm64)
- Push to Docker Hub with tags:
v1.2.3andlatest - Create a GitHub release with Docker run instructions
- Update the Docker Hub repository description
azure-dns-alternative-gui/
βββ .github/
β βββ workflows/
β βββ docker-publish.yml # CI/CD pipeline for Docker
βββ static/
β βββ index.html # Main DNS records page
β βββ settings.html # Configuration page
β βββ app.js # Main page JavaScript
β βββ settings.js # Settings page JavaScript
β βββ styles.css # Modern CSS with dark mode
βββ app.py # Flask backend application
βββ requirements.txt # Python dependencies
βββ Dockerfile # Docker image definition
βββ .dockerignore # Docker build exclusions
βββ .env.example # Example environment variables
βββ .env # Your configuration (not in git)
βββ .gitignore # Git ignore rules
βββ README.md # This file
β οΈ This application does not include user authentication for the web interface- π Azure credentials are stored in environment variables (never commit
.envto git) - π By default, the app runs on all interfaces (
0.0.0.0) - consider restricting this in production - π Ensure your Service Principal has minimal required permissions
- π« Do not expose this application directly to the internet without proper security measures
Container won't start
# Check container logs
docker logs azure-dns-manager
# Check if port is already in use
netstat -an | grep 5000 # Linux/Mac
netstat -ano | findstr :5000 # WindowsConfiguration not persisting
- For Docker: Use environment variables or mount a volume for the .env file
docker run -d -p 5000:5000 -v $(pwd)/.env:/app/.env azure-dns-manager"Module not found" errors
pip install -r requirements.txt"Missing required environment variables" error
Make sure you've created a .env file with all required values or configured via the Settings page.
- Verify your Service Principal credentials are correct
- Check that the Service Principal has appropriate permissions on the DNS zone
- Ensure the subscription ID, resource group, and DNS zone name are correct
- Check that the application is running on port 5000
- Verify no firewall is blocking the connection
- Try accessing via
http://127.0.0.1:5000instead
- User-friendly configuration management UI
- Dark mode support
- Advanced search and filtering
- Docker containerization
- CI/CD pipeline for automated releases
- User authentication and authorization
- HTTPS/TLS support
- Batch operations
- Record import/export (CSV, JSON)
- Audit logging and change history
- Multi-zone support
- Kubernetes deployment manifests
- Webhook notifications
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
- Built with Flask
- Azure integration via Azure SDK for Python
- Icons: Emoji characters for simplicity
Note: This is a development tool. For production use, implement proper security measures including user authentication, HTTPS, and access controls.