Skip to content

dnsdist: new ECSRule to match traffic from ECS option ? #13826

@dmachard

Description

@dmachard
  • Program: dnsdist
  • Issue type: Feature request

Short description

This feature request is to add a new rule to match traffic from specified client subnet (ECS).

Usecase

In a containerized environment, we need to route incoming DNS traffic towards specific authoritative DNS servers.
However in some cases, routing cannot be done directly with the real IP of the client because it is no longer available,
but only with the ECS option.

Here's the routing scheme example:

clients --(no ECS) -> dnsdist edge --(with ECS)-> container dnsdist  ------> dns auth A
                                                             |-------------> dns auth B

I managed to achieve this with the LUA code and a minimalist decoder for the ECS option:

listNmg = newNMG()
listNmg:addMask("172.16.0.0/24")

dofile("/etc/dnsdist/decode_ecs.lua")

addAction(LuaRule(ECSOptionRule(listNmg)), PoolAction("pool_internal"))

I believe it would be nice to add a native rule like ECSRule to facilitate this.
Does this make sense to you?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions