CodexBloom - Programming Q&A Platform

CentOS 7 - `firewalld` Blocks Outgoing HTTP Connections Despite Allowing Port 80

πŸ‘€ Views: 56 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-09
centos firewalld networking bash

I'm learning this framework and I've tried everything I can think of but I'm relatively new to this, so bear with me. I'm having a hard time understanding I've been banging my head against this for hours. After trying multiple solutions online, I still can't figure this out... I've been banging my head against this for hours... I'm having trouble with my CentOS 7 server where `firewalld` seems to be blocking outgoing HTTP connections on port 80, even though I've explicitly allowed the port. I configured it to allow HTTP traffic with the following command: ```bash sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --reload ``` After executing these commands, I verified the active zones with: ```bash sudo firewall-cmd --list-all ``` The output shows that HTTP is indeed allowed. However, when I try to `curl` an external webpage, I get this behavior: ```bash curl: (7) Failed to connect to example.com port 80: Connection timed out ``` I also checked the `iptables` configuration just to be sure that there’s no conflict, but there doesn't appear to be any rules that would block outgoing connections. Here's what I found: ```bash sudo iptables -L -v -n ``` The default policy is set to ACCEPT, and there are no DROP rules present. I've tried restarting `firewalld` and even rebooting the entire server, but the scenario continues. I also verified that the server has a working internet connection by testing other outgoing protocols, such as pinging an external server: ```bash ping -c 4 8.8.8.8 ``` This works perfectly fine. Could there be a service or setting that I’m missing? Any help would be greatly appreciated. Thanks in advance! For context: I'm using Bash on Linux. Thanks in advance! This is part of a larger service I'm building. I'd really appreciate any guidance on this. This issue appeared after updating to Bash 3.9. Could this be a known issue? I'm working with Bash in a Docker container on Debian. Any examples would be super helpful.