This is a Python-based DNS server that resolves DNS queries for .ks domains. The .ks TLD (Top-Level Domain) is a friendly nod to Kush S. a good friend, guide, and the kind of person you want to be or look up to. Cheers, Kush! 🎉 (And hey, you can always change .ks to anything you like from config if you don’t like him. 😜)
- Custom
.ksDomain Support: Resolve.ksdomains with custom records to make your own little corner of the internet. - Support for A and CNAME Records: Currently, the server supports only
AandCNAMErecord types for.ksdomains. - Upstream Resolution: For domains other than
.ks(e.g.,.com,.in), the server gracefully forwards queries to Google's DNS server. - JSON-based Database: The server uses a JSON file (
DB/registry.json) as a database for.ksdomain records.
- Python 3.12.0 installed on your system.
- Note: This project was developed and tested on Python 3.12.0. It has not been tested on other Python versions, and compatibility cannot be guaranteed.
- Required Python packages (installable via
requirements.txt).
-
Clone the repository:
git clone https://github.com/jaythorat/dns_server-python.git cd dns_server-python -
Install the required Python dependencies:
pip install -r requirements.txt
-
Start the DNS server:
python server.py
-
Update your system or browser's DNS settings to point to this server.
-
Add
.ksdomain records by updating theDB/registry.jsonfile.
-
Add
.ksdomain records to theDB/registry.jsonfile (e.g., A or CNAME records). -
Use a DNS query tool (like
dig) or configure your browser/system to use the DNS server. -
Examples of DNS queries using
dig:- Query a custom
.ksdomain (e.g.,test.ks):dig @<DNS_SERVER_IP> test.ks A
dig @<DNS_SERVER_IP> test.ks CNAME
- Query a regular domain (e.g.,
google.com):dig @<DNS_SERVER_IP> google.com
Replace
<DNS_SERVER_IP>with the IP address of your DNS server. - Query a custom
-
Verify
.ksdomains for proper resolution. -
Test non-
.ksdomains (e.g.,.com,.in) to ensure upstream resolution works properly.
- Currently supports only
AandCNAMErecord types for.ksdomains. - Uses a JSON file as a database, which may not scale for large datasets.
- Requires users to manually change their system or browser's DNS server settings to use this custom DNS server.
- Support for additional record types (e.g.,
MX,TXT) to expand functionality. - Integration with a scalable database instead of JSON for better performance.
- Improved logging and error handling for easier debugging.
- Develop a complete registry service similar to services like GoDaddy or Cloudflare, where users can register and manage domains and DNS records.
This project is open-source and available under the MIT License.