简体   繁体   中英

I can't access Docker container from public IP via port forwarding. Can i check where the request stops?

I have a debian (10, buster) server with OMV5 with Docker. I have installed Plex as container. He is in the host network. I can access the website with my LAN_IP:32400. If i setup Port forwarding in my router i get message from chrome that err_connection_unreachable when i try to access Public_IP:xxxxx. I have the same problem with OMV5. I used "* https://www.yougetsignal.com/tools/open-ports/*" to check my ports. They are open. I done port forwarding in the past and it worked (with emby but i didn't used docker)

root@HMS:/home/tomas# netstat -tnlp | grep :32400
tcp6       0      0 :::32400                :::*                    LISTEN      31783/Plex Media Se

root@HMS:/home/tomas# lsof -i -P -n | grep LISTEN
systemd       1            root   82u  IPv4    9711      0t0  TCP *:111 (LISTEN)
systemd       1            root   84u  IPv6    9715      0t0  TCP *:111 (LISTEN)
rpcbind     543            _rpc    4u  IPv4    9711      0t0  TCP *:111 (LISTEN)
rpcbind     543            _rpc    6u  IPv6    9715      0t0  TCP *:111 (LISTEN)
systemd-r   545 systemd-resolve   12u  IPv4   17452      0t0  TCP *:5355 (LISTEN)
systemd-r   545 systemd-resolve   14u  IPv6   17455      0t0  TCP *:5355 (LISTEN)
systemd-r   545 systemd-resolve   17u  IPv4   17458      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd        965            root    3u  IPv4   21652      0t0  TCP *:22 (LISTEN)
sshd        965            root    4u  IPv6   21654      0t0  TCP *:22 (LISTEN)
python3    1040          nobody    7u  IPv6 1586856      0t0  TCP [fe80::cc1d:bf11:ab27:39e9]:5357 (LISTEN)
python3    1040          nobody   10u  IPv4 1586885      0t0  TCP 192.168.1.110:5357 (LISTEN)
python3    1040          nobody   13u  IPv4   25254      0t0  TCP 172.30.32.1:5357 (LISTEN)
python3    1040          nobody   16u  IPv4   23534      0t0  TCP 172.17.0.1:5357 (LISTEN)
python3    1040          nobody   19u  IPv6   29730      0t0  TCP [fe80::42:1fff:fef6:e33d]:5357 (LISTEN)
python3    1040          nobody   22u  IPv6   27608      0t0  TCP [fe80::42:32ff:feea:4626]:5357 (LISTEN)
python3    1040          nobody   25u  IPv4 1322443      0t0  TCP 172.22.0.1:5357 (LISTEN)
python3    1040          nobody   28u  IPv6 1326814      0t0  TCP [fe80::42:40ff:fe86:b55c]:5357 (LISTEN)
smbd       1205            root   30u  IPv6   23693      0t0  TCP *:445 (LISTEN)
smbd       1205            root   31u  IPv6   23694      0t0  TCP *:139 (LISTEN)
smbd       1205            root   32u  IPv4   23695      0t0  TCP *:445 (LISTEN)
smbd       1205            root   33u  IPv4   23696      0t0  TCP *:139 (LISTEN)
docker-pr  1509            root    4u  IPv4   24163      0t0  TCP *:4357 (LISTEN)
docker-pr  1514            root    4u  IPv4   24167      0t0  TCP *:9000 (LISTEN)
docker-pr  1534            root    4u  IPv4   26950      0t0  TCP *:8000 (LISTEN)
nginx      5631            root    6u  IPv4   40960      0t0  TCP 172.30.32.1:62452 (LISTEN)
nginx      5686            root    6u  IPv4   40960      0t0  TCP 172.30.32.1:62452 (LISTEN)
nginx      6460            root    8u  IPv6 1293937      0t0  TCP *:80 (LISTEN)
nginx      6461        www-data    8u  IPv6 1293937      0t0  TCP *:80 (LISTEN)
nginx      6462        www-data    8u  IPv6 1293937      0t0  TCP *:80 (LISTEN)
nginx      6463        www-data    8u  IPv6 1293937      0t0  TCP *:80 (LISTEN)
nginx      6464        www-data    8u  IPv6 1293937      0t0  TCP *:80 (LISTEN)
proftpd   16027         proftpd    0u  IPv6  732740      0t0  TCP *:21 (LISTEN)
python3   21014            root    7u  IPv6 1595813      0t0  TCP *:8123 (LISTEN)
python3   21014            root    8u  IPv4 1595814      0t0  TCP *:8123 (LISTEN)
Plex\x20M 31783           admin   60u  IPv6 2080116      0t0  TCP *:32400 (LISTEN)
Plex\x20M 31783           admin   61u  IPv4 2080118      0t0  TCP 127.0.0.1:32401 (LISTEN)
Plex\x20S 31812           admin    7u  IPv4 2080149      0t0  TCP 127.0.0.1:35321 (LISTEN)
Plex\x20D 31857           admin   14u  IPv4 2080894      0t0  TCP *:1238 (LISTEN)
Plex\x20D 31857           admin   29u  IPv4 2080907      0t0  TCP *:32469 (LISTEN)
Plex\x20T 31861           admin   13u  IPv4 2080174      0t0  TCP 127.0.0.1:32600 (LISTEN)

I believe that the problem is between server pc and the docker. But why it then works over LAN?

Thank you.

The problem was hairpinning. My router doesn't support it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM