Docker Community Forums

Share and learn in the Docker community.

Not able to access port exposed from docker container

docker

(Hpeaviator) #1

I am facing external connectivity issue between host /docker container port 6633 and Switch on the same LAN as host)
Am having the following iptable rules, could not find anything blocking docker externally.

root@Megatron:~/Aviator/PoC/install# iptables -L -v
Chain INPUT (policy ACCEPT 306 packets, 27760 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp – virbr0 any anywhere anywhere udp dpt:domain
0 0 ACCEPT tcp – virbr0 any anywhere anywhere tcp dpt:domain
0 0 ACCEPT udp – virbr0 any anywhere anywhere udp dpt:bootps
0 0 ACCEPT tcp – virbr0 any anywhere anywhere tcp dpt:bootps

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
1084K 823M DOCKER-ISOLATION all – any any anywhere anywhere
130K 176M DOCKER all – any docker0 anywhere anywhere
106K 174M ACCEPT all – any docker0 anywhere anywhere ctstate RELATED,ESTABLISHED
103K 5114K ACCEPT all – docker0 !docker0 anywhere anywhere
0 0 ACCEPT all – docker0 docker0 anywhere anywhere
0 0 ACCEPT all – any virbr0 anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all – virbr0 any 192.168.122.0/24 anywhere
0 0 ACCEPT all – virbr0 virbr0 anywhere anywhere
0 0 REJECT all – any virbr0 anywhere anywhere reject-with icmp-port-unreachable
0 0 REJECT all – virbr0 any anywhere anywhere reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT 18 packets, 2279 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT udp – any virbr0 anywhere anywhere udp dpt:bootpc

Chain DOCKER (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:47541
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:9160
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:8787
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:8445
115 10454 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:8443
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:http-alt
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:7199
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:afs3-callback
0 0 ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:6634
2289 146K ACCEPT tcp – !docker0 docker0 anywhere 172.17.0.2 tcp dpt:6633

Chain DOCKER-ISOLATION (1 references)
pkts bytes target prot opt in out source destination
1084K 823M RETURN all – any any anywhere anywhere

Docker Process:
root@Megatron:~/Aviator/PoC/install# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8c799f5ee9f7 hpsdn/flare:2.7.16 “/run.sh /bin/bash” 19 hours ago Up 19 hours 0.0.0.0:6633-6634->6633-6634/tcp, 0.0.0.0:7001->7001/tcp, 0.0.0.0:7199->7199/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8443->8443/tcp, 0.0.0.0:8445->8445/tcp, 0.0.0.0:8787->8787/tcp, 0.0.0.0:9160->9160/tcp, 0.0.0.0:47541->47541/tcp, 8081/tcp suspicious_blackwell
root@Megatron:~/Aviator/PoC/install#

Host IP Address: 15.212.216.21

Do you see something having issues?