Skip to main content

Simple python3 DNS server

Project description

Python application Pypi version

Description

Simple python3 DNS server

Installation

python3 -m pip install dns_local

Or directly from sources:

git clone git@github.com:doronz88/dns_local.git
cd dns_local
python3 -m pip install -e .

Usage

Usage: python -m dns_local [OPTIONS]

  Start a DNS implemented in Python

Options:
  --bind TEXT      bind address
  --tcp            enable TCP server
  --udp            enable UDP server
  --domain TEXT    domain reply (e.g. example.com:127.0.0.1)
  --fallback TEXT  fallback dns server (e.g. 8.8.8.8)
  --help           Show this message and exit.

For example, consider the following usage:

python3 -m dns_local --bind 192.168.2.1:53 --udp --fallback 8.8.8.8 --domain kaki:192.168.2.1 --domain kaki2:192.168.2.1

This will start a udp DNS server listening at 192.168.2.1:53 with the two entries:

  • kaki1 -> 192.168.2.1
  • kaki2 -> 192.168.2.1

And use Google's DNS server (8.8.8.8) as a fallback for any entry not in given domain list.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dns_local-2.0.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

dns_local-2.0.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file dns_local-2.0.0.tar.gz.

File metadata

  • Download URL: dns_local-2.0.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for dns_local-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b64c787fb03cf3c9383075c30aac31986b39ae6d005c0b728a4937727ff0e2e0
MD5 349b57fd8c9df3f248d45d33bd2dfe29
BLAKE2b-256 1952b8c0c04bc40dd1fa55bfb92f2496cca5514cc8dd54ad56e0d29cd134b481

See more details on using hashes here.

File details

Details for the file dns_local-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: dns_local-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for dns_local-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21e8553eb10e0dffb1a4a0c35a37fb74c37a13a940303e2d50f0c97becd1364f
MD5 33c79bd11c0ca66c3291b06e08a40ece
BLAKE2b-256 52ff788eaa8b8250e3a8ef3797ff4e3aefe734e1944db0d865949a04b00673eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page