Skip to content

AikoSora/dns-server

Repository files navigation

dns-server

DNS Server with Django admin (Python 3.11)

Install project

git clone https://github.com/AikoSora/dns-server.git && cd dns-server
python3 -m venv env && source env/bin/activate
python -m pip install pipenv && pipenv install
cd app && python manage.py migrate

Start DNS server

sudo python manage.py rundnsserver --host $YOUR_IP

use dig to test server

dig @$YOUR_IP example.com

Start Django Admin

python manage.py createsuperuser
python manage.py runserver

Run with docker

Clone repo

git clone https://github.com/AikoSora/dns-server.git && cd dns-server

Configure example.env file and run the following command

cp example.env .env

Configure docker-compose.override.yml.dist file and run the following command

cp docker-compose.override.yml.dist docker-compose.override.yml

Run docker-compose

docker-compose up -d

Perform the migration

docker-compose exec -w /app server python manage.py migrate

Create superuser in admin

docker-compose exec -w /app server python manage.py createsuperuser