Docker Community Forums

Share and learn in the Docker community.

Redirect port with net=host

(Henfri) #1


first of all let me thank to all volunteers helping here! I have already solved many of my problems by reading!

I am running a service (tvheadend) in a container. As I am not running it as root, it cannot use ports <1024. Thus, tvheadend uses port 9983 instead (source)
Unfortunately the service it provides (SAT>IP) usually uses port 554 and not all clients (in fact very few) allow changing the port.
As SAT>IP is multicast, I need to use net=host. Otherwise I would just use p:554:9983

Of course I am not the first with this issue and here it is suggested to use iptables to redirect the port:

iptables -t nat -A PREROUTING -i eth0 -p udp --dport rtsp -j REDIRECT --to-port 9983

But this does not solve the issue for me. I have no clue about iptables, so I am not sure whether this rule is affecting the traffic to my container.

I do see a message in the log in my container (tvheadend log)

2018-08-05 10:03:18.247 [ ERROR] satips: RTSP/1.0 OPTIONS (5) rtsp:// – 400

When accessing with my client application on port 554. So the connection is made but it is not successful.


(Henfri) #2

Does noone have any idea?