-
-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with UDP Proxy #1107
Comments
Thanks for the post. Please share your reverse proxy config and screenshot of the DNS server Optional Protocols settings page so that I can understand your setup better. |
Its very simple and nothing complex. i had crowdsec bouncer in before which is currently removed to reduce the any potential issues. Caddy {
layer4 {
tcp/:53 {
@tdns dns
route @tdns {
proxy {
upstream tcp/ext-dns:538
proxy_protocol v2
}
}
}
udp/:53 {
@udns dns
route @udns {
proxy {
proxy_protocol v2
upstream {
dial udp/ext-dns:53
}
}
}
}
udp/:853 {
@quic quic sni dns.example.com
route @quic {
proxy {
proxy_protocol v2
upstream {
dial udp/ext-dns:53
}
}
}
}
tcp/:853 {
@dot tls sni dns.example.com
route @dot {
tls
proxy {
upstream tcp/ext-dns:538
proxy_protocol v2
}
}
}
} Traefik
services.yml
|
Please share the DNS server's Optional Protocols config screenshot too. Also, do you see any errors logged in the DNS logs? If yes then please share the error logs too. |
This is when using proxy protocol v2
This is using v1
|
Thanks for the details. I tested it in my setup with nginx as the reverse proxy and its working without any issues for both TCP and UDP proxy cases. I would suggest that you run |
Hello, In line 18 of your Caddyfile you're pointing to port 53 instead of 538. Is this intended? It seems to be pointing at the normal port, not UDP-PROXY.
With that said, I tried your Caddy-L4 setup with the :538/udp port and was able to reproduce the same errors on both v1 and v2. With my nginx config working fine, I believe this is an issue with Caddy-L4 rather than Technitium. In fact, Nginx is the only reverse proxy I found to properly supporting PP on UDP so far. |
Hi @ShreyasZare and @skedastically Thanks for testing and confirming my issue with caddy, i've raised a issue on their side mholt/caddy-l4#269 I did also confirm that the work around did work as well, I just wish I could do a double proxy caddy -> nginx -> dns but as you have mentioned, the UDP proxying doesn't quite work properly and it seems that nginx only receives listen 53 proxy_protocol on tcp (could be wrong). @skedastically yeah that was a work around I was using in the meanwhile to get it to respond, though because its not hitting the proxy port, it doesn't log it correctly and forgot to provide what the config should have been. |
I don't know when but there seems to have been some issue that happened when attempting to use the UDP Proxy option to reverse proxy the servers.
I note here that PROXY PROTOCOL should be working for UDP and works well for both TCP and HTTP.
#590
I'm quite confident that I had this setup and working when it first came out but I changed tools and then eventually came back because nothing else worked quite as well and had the features I wanted like Technitium. Since coming back, no matter what reverse proxy i use, traefik or caddy, or what protocol version, it is never able to respond to a request via the the UDP PROXY port configuration.
If im using proxy_protocol v2, i get that its missing the PROXY HEADER error
If I use v1, i get that it is unable to parse the address.
Currently, i'm able to proxy it to the native UDP port (53), but then I lose the ability to track where the requests are coming.
Any insights?
The text was updated successfully, but these errors were encountered: