feat: outgoing-interface binding for recursive queries #93

Open
opened 2026-04-13 06:35:01 +08:00 by razvandimescu · 0 comments
razvandimescu commented 2026-04-13 06:35:01 +08:00 (Migrated from github.com)

Use case

In multi-ISP environments, each resolver instance should egress through a specific ISP uplink so CDN providers return topology-aware responses. Without source IP binding, all recursive queries exit via the default route regardless of which instance handles the query.

Raised by @Palvef in #34.

Proposed

Add an outgoing_interface (or bind_addr) option to [upstream]:

[upstream]
mode = "recursive"
outgoing_interface = "192.168.1.1"   # source IP for outgoing queries

Implementation: bind() the outgoing UDP/TCP socket to the specified address before connect()/send_to() in the recursive and forwarding paths.

References

  • Unbound: outgoing-interface: 192.168.1.1
  • BIND: query-source address 192.168.1.1
## Use case In multi-ISP environments, each resolver instance should egress through a specific ISP uplink so CDN providers return topology-aware responses. Without source IP binding, all recursive queries exit via the default route regardless of which instance handles the query. Raised by @Palvef in #34. ## Proposed Add an `outgoing_interface` (or `bind_addr`) option to `[upstream]`: ```toml [upstream] mode = "recursive" outgoing_interface = "192.168.1.1" # source IP for outgoing queries ``` Implementation: `bind()` the outgoing UDP/TCP socket to the specified address before `connect()`/`send_to()` in the recursive and forwarding paths. ## References - Unbound: `outgoing-interface: 192.168.1.1` - BIND: `query-source address 192.168.1.1`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dearsky/numa#93