Skip to content

Instantly share code, notes, and snippets.

@skiptomyliu
Created October 23, 2020 14:58
Show Gist options
  • Save skiptomyliu/0ae0959d5f2d6b6c225b393ed145fb73 to your computer and use it in GitHub Desktop.
Save skiptomyliu/0ae0959d5f2d6b6c225b393ed145fb73 to your computer and use it in GitHub Desktop.
Basic Envoy DNS Filter
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9901
static_resources:
listeners:
- name: listener_2
address:
socket_address:
protocol: UDP
address: 127.0.0.1
port_value: 5353
reuse_port: true
listener_filters:
name: envoy.filters.udp.dns_filter
typed_config:
"@type": "type.googleapis.com/envoy.extensions.filters.udp.dns_filter.v3alpha.DnsFilterConfig"
stat_prefix: "dns_filter_prefix"
client_config:
resolver_timeout: 5s
upstream_resolvers:
- socket_address:
address: "1.1.1.1"
port_value: 53
- socket_address:
address: "8.8.4.4"
port_value: 53
max_pending_lookups: 5
server_config:
inline_dns_table:
known_suffixes:
- suffix: "example.org"
- suffix: "example.com"
- suffix: "yahoo.com"
virtual_domains:
- name: "www.example.org"
endpoint:
address_list:
address:
- 93.184.216.34
- name: "www.example.com"
endpoint:
address_list:
address:
- 93.184.216.34
- name: "www.yahoo.com"
endpoint:
address_list:
address:
- 74.6.231.20
@chatmoo
Copy link

chatmoo commented Aug 5, 2021

upstream_resolvers should be relpaced with resolvers:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment