catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
329 stars 81 forks source link

if it's possible to specify a network interface? #903

Closed sonic42 closed 3 years ago

sonic42 commented 3 years ago

This is a feature request. On systems with more then one network interface it's possible to select one or more specific network interfaces. With my tests, the daemon binding on all interfaces with port 554 but the service SSDP announcement is only on first interface.

lars18th commented 3 years ago

Hi @sonic42 ,

Yes, the announcement of the SSDP is quite complex to manage inside a multihomed server. In fact, the SSDP could be understanded is an independent process of the RTSP service. The fact is that the developers of the SAT>IP standard never have considered a multihomed server. And this have some consequencies: for example, the SSDP announcement can bind only to one network addresss. The reason is because in the RTSP protocol the server needs to publish his address and the client requires to know and use it. So if the client connects with the server using a secondary address then the server needs to manage this. Quite complex in fact! So the standard doesn't support this.

Nevertheless, some workarounds exist. My prefered solution is this: run minisatip only in one network address. And if you need to leave the option to connect using other addresses, then run a proxy on each of these addresses that connects to the main minisatip. The proxy could be another minisatip instance or a pure SAT>IP proxy. In any case, the SSDP announcement requires to be done one-per-address. So if you're running a proxy in the same machine then take note that SSDP is multicast. And then you need to restrict the addresses where you publish it. And as this it's a pain, I prefer to run the proxies in other machines (or inside a container). Then you can isolate the multicast SSDP announcement.

I hope this helps you. Regards.

sonic42 commented 3 years ago

Hi lars18th,

thanks for your answer an your explanation.

My setup is a little bit smaller. The SSDP announcement is not critical for me. I had hoped, it's possible to remove specific interface from RTSP service binding. I'm using this on a firewall distri. The first Interface is common the external interface. I know, this not the target platform for this software. Most Linux other server daemons can handle more the one network interfaces out oft the box.

Regards.

lars18th commented 3 years ago

Hi @sonic42 ,

Then I can assume that what you want to do is to limit the SDDP announcement to an specific interface. So when you have more than one, instead of use the first in the system you want to select something different. It's that?

If yes, then ask to @catalinii if he want to implement this "simple" change. Regards.