Caddy as Remote Desktop Gateway

(Peter Pan) #1

Is there any configuration/plugin available that enables me to forward all tcp traffic on port 3389 for a certain subdomain to my remote desktop server, eg like. {proxy / localhost}

The protocoll to be forwarded is the RDP protokoll. Therefore the above cofig is not working.
I tried also the rawpproxy ( ). But no success.

Any hints?


(Matthew Fay) #2

Try the net server type - you should be able to forward all TCP traffic.

(Peter Pan) #3

Thank you, I was able to configure a net server accordingly.

But in may case I would like to you use the outbound port also for http server connections. By the requested domain name either http proxy or net proxy should be used.
(so http and net server must be bound to same port - currently unsupported by caddy)

Do you see any chance to realize this with caddy?

Thx, P.

(Matthew Fay) #4

I don’t think this is possible with any software (that is, sharing a port with another program). Some kind of code needs to determine which packets should go where, and a port is the most granular level, from a networking perspective, to differentiate what service the traffic is intended for.

I have to admit that I’m not that familiar with the net server type, but it does indicate that it can differentiate traffic by hostname, despite being a TCP server. Does it allow multiplexing proxies on a port with different hostnames?

(Mike Park (Parkie)) #5

Hope it’s ok to ask a similar question here. I want to access my desktop using remote desktop without exposing/opening port 3389 on my router, would I still use use the net plugin? and what would the Caddyfile look like if I’m using to connect? I did read the documentation but I’m a little puzzled.

(Matthew Fay) #6

What purpose would the net plugin serve, exactly?

If you want to RDP to your computer with a different external port, just forward a different external port from your router to port 3389 on your computer. Caddy’s net server type would just be replicating the kind of port forwarding you can just do with your networking hardware, in fact would already have to do (to pass traffic to Caddy in the first place).