cURL Error 7 - Permission Denied?

ridinhighspeeds

Registered
Sep 27, 2016
2
0
1
MA
cPanel Access Level
Root Administrator
I have cURL SSL enabled in Apache3 and for some reason, I'm able to cURL to google.com, however I cannot cURL to http:/domain.com/test.php. I get the following error:
CURL ERROR 7 Failed to connect to Permission denied.

I contacted theme-fusion and they suggested whitelisting the url, but I don't see that option in WHM? I do have ConfigServer Firewall installed, however cURL still gives that error even with the firewall completely disabled?

They recommended I apply the following change, and that didn't help either:
[Removed URL]

Any suggestions?
Thanks
 
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hello :),

Might be there is an issues with the iptables OR SElinux which is enabled on your server and blocking your curl request. Check SElinux status and try to disabled it.
 

ridinhighspeeds

Registered
Sep 27, 2016
2
0
1
MA
cPanel Access Level
Root Administrator
Thank you for your help. I checked my server and SElinux is disabled.. I checked my iptables, and this is what I have.. Is there a way to allow the theme-fusion url in iptables?

Code:
# Generated by iptables-save v1.4.7 on Thu May  1 23:26:02 2014
*nat
:PREROUTING ACCEPT [655:57797]
:POSTROUTING ACCEPT [398:24677]
:OUTPUT ACCEPT [398:24677]
COMMIT
# Completed on Thu May  1 23:26:02 2014
# Generated by iptables-save v1.4.7 on Thu May  1 23:26:02 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [23701:3467485]
:acctboth - [0:0]
:cP-Firewall-1-INPUT - [0:0]
-A INPUT -j cP-Firewall-1-INPUT
-A INPUT -j acctboth
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j cP-Firewall-1-INPUT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -j acctboth
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2078 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2082 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2077 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 26 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 143 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 995 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2086 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2087 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2095 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 465 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2096 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
-A cP-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 2083 -j ACCEPT
-A cP-Firewall-1-INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
COMMIT
# Completed on Thu May  1 23:26:02 2014
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello,

You could try whitelisting the IP address utilized by that website in your CSF configuration to see if that makes a difference.

Thank you.
 
  • Like
Reactions: Optimizr