ovn-org / ovn

Open Virtual Network
Apache License 2.0
488 stars 243 forks source link

DNS TCP responder #80

Open tomponline opened 3 years ago

tomponline commented 3 years ago

Is it possible to have OVN respond to internal DNS requests over TCP as well as UDP?

That way if a client is using TCP DNS, they can still resolve internal DNS names.

numansiddique commented 3 years ago

It should be possible.

Patches/PR welcome if you want to add the support.

Thanks Numan

osfrickler commented 2 years ago

I don't see how this would be possible. You would have to spoof a SYN+ACK to the initial SYN before you know how the query will look like, intercepting all DNS traffic over TCP.

numansiddique commented 2 years ago

Right now OVN supports internal DNS resolution (if configured) for UDP. I suppose same can be done for TCP too. Presently, if internal OVN DNS is configured on a logical switch, then we add a flow with the controller action and ovn-controller tries to resolve the DNS and reply with the DNS resolution. If it can't resolve, the packet is resumed and it continues the pipeline.

So I suppose same can be done for DNS via TCP too.