OPNsense Forum

English Forums => General Discussion => Topic started by: rjdza on September 20, 2021, 04:30:49 PM

Title: [SOLVED] Generic UDP Proxy - possible?
Post by: rjdza on September 20, 2021, 04:30:49 PM
I have some UDP traffic I need to proxy.  Since I'm not the default GW for the servers on the inside, NATing will not work.

I've used the tool pen for UDP proxying in the past, but am happy for anything that will allow me to proxy UDP traffic.

Right now the traffic I need to proxy will be SIP and IAX, but there may be other types of UDP in the future.

Any suggestions welcome.
Title: Re: Generic UDP Proxy - possible?
Post by: bartjsmit on September 20, 2021, 05:32:19 PM
Check out SOCKS
Title: Re: Generic UDP Proxy - possible?
Post by: rjdza on September 20, 2021, 06:40:07 PM
Quote from: bartjsmit on September 20, 2021, 05:32:19 PM
Check out SOCKS

Sorry, I should have specified that it is for traffic coming into the network, not leaving it.
Title: Re: Generic UDP Proxy - possible?
Post by: bartjsmit on September 20, 2021, 07:30:09 PM
How about a VPN server with a TAP interface and do NAT on that?
Title: Re: Generic UDP Proxy - possible?
Post by: fabian on September 20, 2021, 07:33:09 PM
nginx can do that in stream mode.
Title: Re: Generic UDP Proxy - possible?
Post by: rjdza on September 20, 2021, 07:48:44 PM
Quote from: fabian on September 20, 2021, 07:33:09 PM
nginx can do that in stream mode.

Thanks, looking into that right now.
Title: Re: Generic UDP Proxy - possible?
Post by: rjdza on September 20, 2021, 08:30:31 PM
Quote from: fabian on September 20, 2021, 07:33:09 PM
nginx can do that in stream mode.
Appears to be working like a charm, thanks!

Had a strange problem where an existing /var/run/nginx_status.sock was preventing nginx from starting, once I deleted that, everything went great.
Title: Re: [SOLVED] Generic UDP Proxy - possible?
Post by: fabian on September 21, 2021, 08:59:26 AM
Maybe left over from a server crash or something like that. It is safe to delete that file.
Title: Re: [SOLVED] Generic UDP Proxy - possible?
Post by: rjdza on September 21, 2021, 11:38:26 AM
Quote from: fabian on September 21, 2021, 08:59:26 AM
Maybe left over from a server crash or something like that. It is safe to delete that file.

It's a brand new server - 4 days old. Give or take a day, I guess.  No crashes.

In any case, it's a once off, not overly concerned about it.

Back on topic, Nginx is working out quite nicely.  This is the first time I've used it for UDP or Streamed data.