Strange Problem With Curl, Port 80, and IPTables - RESOLVED

Hello all,

I'm dealing with a challenging problem on my server that's causing a lot of symptoms. I've narrowed down what I think is the root problem. Here's where I'm at:

1) My Curl is not able to access Port 80. Other ports work no problem. So I can CURL any https URL, but not http URLS.

2) The problem isn't CURL, as when I use SVN, I can use repos that are https, but not http.

3) IP Tables seems to be OK as far as configuration goes, but there does appear to be a problem when I restart it. Here's what happens when I run iptables -;

https://pastebin.linode.com/8064

4) Here's what happens when I issue service iptables restart

~~![](<URL url=)http://i.imgur.com/L59Gnzo.png" />

As you can imagine, this is all quite frustrating since PHP wraps CURL and pretty much everything is broken. Yum is even broken.

Thank you,

Josh~~

7 Replies

What does iptables -S say? I'm leaning toward your output rules.

> root@li [~]# iptables -S

-P INPUT ACCEPT

-P FORWARD ACCEPT

-P OUTPUT ACCEPT

@jziering:

Hello all,

I'm dealing with a challenging problem on my server that's causing a lot of symptoms. I've narrowed down what I think is the root problem. Here's where I'm at:

1) My Curl is not able to access Port 80. Other ports work no problem. So I can CURL any https URL, but not http URLS.

2) The problem isn't CURL, as when I use SVN, I can use repos that are https, but not http.

3) IP Tables seems to be OK as far as configuration goes, but there does appear to be a problem when I restart it. Here's what happens when I run iptables -;

https://pastebin.linode.com/8064

4) Here's what happens when I issue service iptables restart

~~![](<URL url=)http://i.imgur.com/L59Gnzo.png" />

As you can imagine, this is all quite frustrating since PHP wraps CURL and pretty much everything is broken. Yum is even broken.

Thank you,

Josh Pastebin the output of the following when curl is having this problem:

iptables-save

For #4, that is a problem with CentOS not understanding what the security table is. There's a patch for it, but the site hosting it is currently down, and I can't find another copy anywhere.~~

https://p.linode.com/8065

out of curiosity what are the contents of /etc/sysconfig/iptables?

Here you are:

https://p.linode.com/8066

Thanks Linode Support and everyone who responded.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct