Docker-proxy port mapping failed and could not be communicated by telnet

Hello, prawns!

I launch a container (docker version 18.06.1 build e68fc7a) in Ali CVM, and the command is as follows:

docker run --detach -it --publish 3030:3000/tcp  -v : --name  --restart always centos:latest /bin/bash

Container starts successfully and, docker ps-a has no problem checking port mapping:

clipboard.png

netstat -ntpl3030TCP6:

clipboard.png
3030

:

clipboard.png

0.0.0.0/03030:

clipboard.png

iptablesseliunx:

clipboard.png


I guess this problem is the reason why your host does not have a public network ip


didn't take a closer look at it just now. Docker's port mapping is implemented using iptables, and you use the iptables-L command to display the filter table by default. There is no reference point. You can use the iptables-save command.
clipboard.png

Bash telnet



,WARNING: IPv4 forwarding is disabled. Networking will not work.
1-sharp vim /usr/lib/sysctl.d/00-system.conf

2net.ipv4.ip_forward=1
3-sharp systemctl restart network



5.jpg

6.jpg

7.jpg

8.jpg

my environment and situation are similar to those of the landlord. I would like to ask: why is it that this machine can communicate with telnet, but not with public network ip?


I guess you may be using a mirrored docker, from another machine. You need to delete the existing docker and then rebuild the docker. Or there is a possibility that the network segment of your docker conflicts with that of the host.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48e42-6668e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48e42-6668e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?