Skip to content

Instantly share code, notes, and snippets.

@zhengkai
Last active December 9, 2020 10:46
Show Gist options
  • Save zhengkai/4c3fc2b1734682441316e23f9dc2b7bc to your computer and use it in GitHub Desktop.
Save zhengkai/4c3fc2b1734682441316e23f9dc2b7bc to your computer and use it in GitHub Desktop.
域名劫持例子:劫持指定域名到 127.0.0.1,其他的访问上游 192.168.1.1
(hijack) {
template IN A {
answer "{{ .Name }} 60 IN A 127.0.0.1"
}
log
}
amazonaws.com {
import hijack
}
. {
forward . 192.168.1.1:53
cache 10800
log
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment