CZ-NIC / knot-resolver

Knot Resolver - resolve DNS names like it's 2024
https://www.knot-resolver.cz/
Other
362 stars 59 forks source link

Source address for FORWARD / STUB #120

Closed felbinger closed 6 days ago

felbinger commented 6 days ago

Is it possible to specify the source address for forward / stub policies?

policy.add(policy.suffix(policy.STUB({
  '172.20.0.53',
  '172.23.0.53',
  'fd42:d42:d42:54::1',
  'fd42:d42:d42:53::1'
}), {todname('dn42.')}))

I couldn't find anything in the documentation yet.

vcunat commented 6 days ago

Just a global source address is settable, used for all outgoing traffic IIRC. https://www.knot-resolver.cz/documentation/v5.7.4/daemon-bindings-net_client.html#net.outgoing_v4

felbinger commented 6 days ago

Thanks a lot

felbinger commented 6 days ago

@vcunat Is it possible to use these outgoing addresses only for a specific policy?

vcunat commented 6 days ago

No, currently this is the only setting we have.

felbinger commented 6 days ago

Ok, so NAT it's going to be 😒 Thank you!