https://github.com/merrychap/dns-cache
:anchor: Implementation of a caching DNS server. All operations are correspond to RFC 1035
https://github.com/merrychap/dns-cache
cache dns dns-server implementation rfc-1035
Last synced: 2 months ago
JSON representation
:anchor: Implementation of a caching DNS server. All operations are correspond to RFC 1035
- Host: GitHub
- URL: https://github.com/merrychap/dns-cache
- Owner: merrychap
- License: mit
- Created: 2017-08-27T13:35:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-20T12:22:34.000Z (over 3 years ago)
- Last Synced: 2025-03-24T07:11:21.141Z (3 months ago)
- Topics: cache, dns, dns-server, implementation, rfc-1035
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Implementation of a caching DNS Server
### General description
This is an implementation of a UDP caching DNS server written in Python3.
All written operations are correspond to RFC 1035### Requirements
- Python 3.*
- IPy### Usage
To run a server use the next command:
```sh
$ python3 dns.py [-h] [-p P] [-f F]
```List of arguments:
Argument | Description
-------- | ----------
-h, --help | Show this help message and exit
-p P | Port for running a server
-f F | Address of a forwarder written in format IP:Port. Port can be omittedFor example, you run a server on 9090 port. Then you can make queries to it by typing the next command (get A records from google.com):
```sh
dig +notcp @127.0.0.1 -p 9090 google.com A
```### Example of using
```sh
$ python3 dns.py -p 9090 -f 8.8.8.8
[+] Server is configurated
[+] Server is running on 9090 port2017-05-09 20:14:50 -- [*] 127.0.0.1 A google.com. forwader
2017-05-09 20:14:51 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:52 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:52 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:52 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:53 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:53 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:14:54 -- [*] 127.0.0.1 A google.com. cache
2017-05-09 20:15:02 -- [*] 127.0.0.1 A ya.ru. forwader
2017-05-09 20:15:03 -- [*] 127.0.0.1 A ya.ru. cache
2017-05-09 20:15:05 -- [*] 127.0.0.1 NS ya.ru. forwader
2017-05-09 20:15:06 -- [*] 127.0.0.1 NS ya.ru. cache
```