https://github.com/czerwonk/dns-drain
Drain and undrain frontends by using DNS
https://github.com/czerwonk/dns-drain
dns drain frontend golang
Last synced: 5 months ago
JSON representation
Drain and undrain frontends by using DNS
- Host: GitHub
- URL: https://github.com/czerwonk/dns-drain
- Owner: czerwonk
- License: mit
- Created: 2016-12-23T07:28:02.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-07-10T04:47:31.000Z (11 months ago)
- Last Synced: 2025-07-10T13:23:40.487Z (11 months ago)
- Topics: dns, drain, frontend, golang
- Language: Go
- Homepage:
- Size: 7.15 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dns-drain
[](https://travis-ci.org/czerwonk/dns-drain)
[](https://goreportcard.com/report/github.com/czerwonk/dns-drain)
Drain by removing/replacing IP/net from DNS records with ease
## Remarks
This tool uses GO modules and requires go 1.23+ to build.
## Usage
Drain IP 1.2.3.4 in project api-project-xxx by removing IP from records
```
$ dns-drainctl gcloud --project api-project-xxx drain -f drain.json 1.2.3.4/32
```
Drain IP 1.2.3.4 in project api-project-xxx by replacing IP with 1.2.3.5
```
$ dns-drainctl gcloud --project api-project-xxx drain 1.2.3.4/32 -f drain.json --replace-by 1.2.3.5
```
Undrain by using json file written in drain process
```
$ dns-drainctl gcloud --project api-project-xxx undrain -f drain.json
```
## Supported providers
* Google Cloud DNS
## Future plans
* support for more providers
## License
(c) Daniel Czerwonk, 2016. Licensed under [MIT](LICENSE) license.