Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stalkr/dns-reverse-proxy
DNS Reverse Proxy
https://github.com/stalkr/dns-reverse-proxy
Last synced: 3 months ago
JSON representation
DNS Reverse Proxy
- Host: GitHub
- URL: https://github.com/stalkr/dns-reverse-proxy
- Owner: StalkR
- License: apache-2.0
- Created: 2015-01-25T16:50:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T14:46:03.000Z (6 months ago)
- Last Synced: 2024-06-21T15:18:36.313Z (5 months ago)
- Language: Go
- Homepage: https://godoc.org/github.com/StalkR/dns-reverse-proxy
- Size: 30.3 KB
- Stars: 181
- Watchers: 12
- Forks: 44
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-network-stuff - **124**星
README
# DNS reverse proxy
[![Build Status][build-img]][build]
[![Godoc][godoc-img]][godoc][build]: https://github.com/StalkR/dns-reverse-proxy/actions/workflows/build.yml
[build-img]: https://github.com/StalkR/dns-reverse-proxy/actions/workflows/build.yml/badge.svg
[godoc]: https://godoc.org/github.com/StalkR/dns-reverse-proxy
[godoc-img]: https://godoc.org/github.com/StalkR/dns-reverse-proxy?status.pngA DNS reverse proxy to route queries to different DNS servers.
To illustrate, imagine an HTTP reverse proxy but for DNS.It listens on both TCP/UDP IPv4/IPv6 on specified port.
Since the upstream servers will not see the real client IPs but the proxy,
you can specify a list of IPs allowed to transfer (AXFR/IXFR).Example:
$ go run dns_reverse_proxy.go -address :53 \
-default 8.8.8.8:53 \
-route .example.com.=8.8.4.4:53 \
-allow-transfer 1.2.3.4,::1A query for `example.net` or `example.com` will go to `8.8.8.8:53`, the default.
However, a query for `subdomain.example.com` will go to `8.8.4.4:53`. `-default`
is optional - if it is not given then the server will return a failure for
queries for domains where a route has not been given.# Setup
Install go package, create Debian package, install:
$ go get -u github.com/miekg/dns
$ go get -u github.com/StalkR/dns-reverse-proxy
$ cd $GOPATH/src/github.com/StalkR/dns-reverse-proxy
$ fakeroot debian/rules clean binary
$ sudo dpkg -i ../dns-reverse-proxy_1-1_amd64.debConfigure in `/etc/default/dns-reverse-proxy` and start with
`/etc/init.d/dns-reverse-proxy start`.# License
[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
# Thanks
- the powerful [github.com/miekg/dns][miekg/dns] Go library by [@miekg][miekg]
[miekg/dns]: https://github.com/miekg/dns
[miekg]: https://github.com/miekg# Related
- [github.com/notsobad/dns-reverse-proxy][notsobad] fork with DNS-over-HTTPS
routing support and passive DNS standard logging[notsobad]: https://github.com/notsobad/dns-reverse-proxy
# Bugs, feature requests, questions
Create a [new issue][new-issue].
[new-issue]: https://github.com/StalkR/dns-reverse-proxy/issues/new