PyDNSProxy Configuration.
Jioh L. Jung ([email protected])
This code is under License of BSD.
DNS Proxy + SNI/HTTP Proxy + Very Basic Authenticate
This source is working with Python 3.x + AsyncIO. you have to run in *NIX include Linux as root permission.
docker run -it --rm \
-p 53:53/udp -p 443:443 -p 80:80 \
-v `pwd`/dns.conf:/opt/dns.conf \
-e "AUTH_LIST=10.2.3.4,10.9.8.7" \
-e "AUTH_BLOCK=10.3.4.0/24,192.4.5.0/24" \
-e "PASSPHASE=open.sesami" \
-e "EXT_IP=1.2.3.4" -e "SELF_IP=5.6.7.8" \
ziozzang/pydnsproxy
docker build -t pydnsproxy .
docker run -it --rm \
-p 53:53/udp -p 443:443 -p 80:80 \
-v `pwd`/dns.conf:/opt/dns.conf \
-e "AUTH_LIST=10.2.3.4,10.9.8.7" \
-e "AUTH_BLOCK=10.3.4.0/24,192.4.5.0/24" \
-e "PASSPHASE=open.sesami" \
-e "EXT_IP=1.2.3.4" -e "SELF_IP=5.6.7.8" \
pydnsproxy
#Volume mount and Port Binding.
# you can set upstream DNS server on specific docker, use "--dns=" option.
on source code, there's 3 kind of configuration.
auth_list = ["10.2.3.4", "10.3.4.5"] # per IP Auth.
auth_block = ["10.1.0.0/16", "10.98.76.0/24"] # Block by
passphase = "open.the.gate.sesami"
filter_exist_dns = True
if you want to allow any IP, set environment parameter "ALLOW_ANY"
if you want to run only DNS server (no sniproxy), set environment parameter "ONLY_DNS_SERVER"
on dns.conf file, you can control dns record what to reply fake one. see dns.conf file.
Matchings are sequancial.
if one rule matched, ignored remains.
There's 3 kinds of match type. partial match(match zone), exact match and regular expression match.
Content type
Image
Digest
Size
28.4 MB
Last updated
over 8 years ago
docker pull ziozzang/pydnsproxy