I am trying to connect to my https service (port 443) on docker host’s public (LAN) ip from the docker container but I am not able to. Container is not able to ping the public i.e. LAN ip of the host as well. I am using the default bridge network for the container and default docker0 config. I know this should work fine (because I have tried it before). My host IP is 172.23.166.174. I am posting the firewall output here, I am suspecting this could be firewall issue but I need confirmation:
[root@myhost ~]# iptables -n -L
Chain INPUT (policy DROP)
target prot opt source destination
SXP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:64999
RATELIMIT all -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP)
target prot opt source destination
DROP all -- 172.17.0.0/16 169.254.1.0/24
DROP all -- 169.254.1.0/24 172.17.0.0/16
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
DOCKER all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DROP icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 14
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
Chain CONNLIMIT (1 references)
target prot opt source destination
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060 flags:0x17/0x02 #conn src/0 > 10 reject-with icmp-port-unreachable
DEFAULTCHAIN all -- 0.0.0.0/0 0.0.0.0/0
Chain DEFAULTCHAIN (1 references)
target prot opt source destination
PROD_FW_NGFD_CHAIN tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7802
PROD_FW_NG_CHAIN tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7800
PROD_FW_JGRP_CHAIN tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:12001
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
PROD_FW_ORACLE_CHAIN tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1521
DROP icmp -- 0.0.0.0/0 0.0.0.0/0 icmptype 13
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:161
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1645
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1812
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1646
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1813
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:8905
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:9993
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:20514
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:1700
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:3799
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:40514
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:49
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8905
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8080
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8909
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8910
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1468
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:6514
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9090
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9094
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9095
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:11468
PXGRID tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:5222
PXGRID tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7400
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:2083
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:547
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8443
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:8444
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9060
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9002
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:67
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:68
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:162
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2560
ACCEPT 2 -- 0.0.0.0/0 0.0.0.0/0
Chain DOCKER (4 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 169.254.1.4 tcp dpt:3000
Chain PROD_FW_JGRP_CHAIN (1 references)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:12001
Chain PROD_FW_NGFD_CHAIN (1 references)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7802
Chain PROD_FW_NG_CHAIN (1 references)
target prot opt source destination
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7800
Chain PROD_FW_ORACLE_CHAIN (1 references)
target prot opt source destination
ACCEPT tcp -- 172.23.166.174 0.0.0.0/0 tcp dpt:1521
Chain PXGRID (2 references)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 172.23.166.174 tcp dpt:5222
ACCEPT tcp -- 172.23.166.174 0.0.0.0/0 tcp dpt:7400
Chain RATELIMIT (1 references)
target prot opt source destination
CONNLIMIT all -- 0.0.0.0/0 0.0.0.0/0
Chain SXP (1 references)
target prot opt source destination