I'm running docker container using below command and this container's host is in the internal private network.
docker run --restart always --name srs2 -d -p 1935:1935 -p 1985:1985 -p 8080:8080 -p 8000:8000/udp -p 10080:10080/udp ossrs/srs:5
I need to access container's 8080 port from the external hosts and i've set port forwarding in my router config page as 28080:8080
. With this setup i expect i can access container using 28080 port but this not even allows me to start tcp handshake(SYN packet is not reaching).
I should mention that it is possible to access other ports(not in the container) of host without any issue. So there is no issue on port forwarding setup. Also it is possible that accessing container from other hosts in the same private network but not external.
The below is the output of docker inspect
"NetworkSettings": {
"Bridge": "",
"SandboxID": "59c04190dbc0ee6f24b8e48a3e3e4ac927995c35ebb00bdef057b4ab0887d025",
"SandboxKey": "/var/run/docker/netns/59c04190dbc0",
"Ports": {
"10080/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "10080"
},
{
"HostIp": "::",
"HostPort": "10080"
}
],
"1935/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1935"
},
{
"HostIp": "::",
"HostPort": "1935"
}
],
"1985/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "1985"
},
{
"HostIp": "::",
"HostPort": "1985"
}
],
"5060/tcp": null,
"8000/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8000"
},
{
"HostIp": "::",
"HostPort": "8000"
}
],
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8080"
},
{
"HostIp": "::",
"HostPort": "8080"
}
],
"9000/tcp": null
}