ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.24k stars 622 forks source link

Broadcast failing if port (5443/5080) is not specified in a playlist URL. #6607

Closed amarantmeida closed 2 weeks ago

amarantmeida commented 1 month ago

Short description

Broadcast failing to start if port (5443/5080) is not specified in a playlist video URL.

Environment

Steps to reproduce

1.Create a Playlist 2.Add a video via id/link url- https://test.antmedia.io/test/streams/163420825925063644478233.mp4 3.Start Broadcast

Expected behavior

Playlist should be able to broadcast

Actual behavior

We are encountering an error in broadcast

Logs

Place logs on pastebin or elsewhere and put links here

Ask your questions on Ant Media Github Discussions

lastpeony commented 3 weeks ago

We had a discussion about this with @muratugureminoglu thanks to him

This problem can be solved by running those 2 commands in corresponding server:

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 5443
iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDIRECT --to-port 5443

Both rules together ensure that all traffic—whether incoming or local—intended for port 443 is redirected to port 5443.

As you see after above configuration server can access the local files without port image

We will discuss further to integrate this to installation script to make this default behaviour or not.