Help with WebRTC / HAproxy / NAT ?

Started by Tookie, October 22, 2024, 08:18:14 PM

Previous topic - Next topic
Hi,

version: OPNSense 24.7.6

I have a 3D printer server under Fluidd, which allows me to have a web interface and a webcam sent via WebRTC.
If I access via LAN, everything works, I have interface + camera.
If I access via VPN from my phone through opnsense, everything is ok interface+camera.

But, and this is where I completely fail, through the WAN it is impossible to obtain video from the camera.
I access the printer interface through a reverse proxy (HAproxy). I don't know if there is something to configure on HAproxy for it to work.

I tried pure NAT, so port 80 of my Wan to port 80 of my server, I still have the WEB interface, but the camera video remains black.

I've read things about a "STUN", but I don't know anything about webRTC so I'm completely lost.. If anyone can give me a hand :)

If you need more information, don't hesitate. THANKS !

Not the same setup by I am having the same issues with WebRTC - specifically the UDP ports that are associated.  Typically, that STUN protocol will leverage UDP 3478.  Then the accepted session will ride your UDP session min / max states (ex ports 50000-50010 UDP) as TURN.

Are you running any systems such as Unifi or others that have an associated access point that is discovered and adopted through its UI?

I found out that my system uses 3478 UDP in order to adopt devices.  So, I have to use another UDP port as my WebRTC port.  I have yet to try leveraging a different network segment for my services, but that might also work.