How do you control the firewall flag in the network settings of containers?

Skyrider

Active Member
May 11, 2020
55
1
28
38
So after some struggling, I recently noticed that there's a firewall flag at the network settings of containers. Can't seem to be controlled by the host/node firewall ports that is being allowed. At least, I think so. Because if I attempt to allow specific ports (in this case 80/443),curling the subdomain inside a container from another container on the same host shows a timeout. Same with LFS GIT, issue with cloning.

11:58:23.892095 trace git-lfs: tq: enqueue retry #1 after 0.25s for "7680e3bb3730a9491dd729fc13150cf8c8e4c245c8b574d04c211fecd2bdf8a4" (size: 6144): batch response: Post "https://subdomain/teamname/repo.git/info/lfs/objects/batch": dial tcp containerip:443: i/o timeout

80/443 all works, as the (sub)domains work without issue. But the container seems to be having issues reaching (sub)domains. But when I disable the network firewall flag, all works just fine. I'm quite puzzled at this. The subdomain is set in cloudflare, but I disabled its proxy for git purposes. I'd appreciate the help on this matter.
 
Last edited:
Still confused as to why this is not working

curl http://ipaddressofgitinstallation - works
curl https://ipaddressofgitinstallation - does not work timeout
curl http://subdomain - does not work timeout
curl https://subdomain - does not work timeout

Yet the firewall of the host, node and container allows 80/443, and it works just fine when accessing the site by hand. So it is a firewall issue as the firewall flag in the network settings of the container to off makes thing work. Also using the following in the network interface of the host to a different reverse proxy container.

# REVERSE PROXY
post-up iptables -t nat -A PREROUTING -d xxxx -p tcp --dport 80 -j DNAT --to-destination xxxx:80 ## Reversed Proxy 80
post-down iptables -t nat -A PREROUTING -d xxxx -p tcp --dport 80 -j DNAT --to-destination xxxx:80 ## Reversed Proxy 80
post-up iptables -t nat -A PREROUTING -d xxxx -p tcp --dport 443 -j DNAT --to-destination xxxx:443 ## Reversed Proxy 443
post-down iptables -t nat -A PREROUTING -d xxxx -p tcp --dport 443 -j DNAT --to-destination xxxx:443 ## Reversed Proxy 443
 
Last edited: