CSF blocks CURL requests

webunity

Verified User
Joined
Sep 23, 2014
Messages
49
How can i allow "ALL" curl (outgoing) requests from my server to external sites? In this case it was a POST request to a payment provider.
I tried adding curl to the csf.plist file but still requests to an IP (which i could not find in any of the IPtables or .deny lists) failed.
Only after adding the IPs of the payment provider specifically to the 'allow' list it started working, but their IP might change as well so that is not a desirable solution..

Any tips?
 
I asume you opened ports inside csf.conf for http port 80 and/or https port 443 outgoing to the payment provider API?

I would suggest to take PHP out of the equation, try connecting to the URL in your script manually. You could use curl on the command line, or other tools such as the command line browser "lynx" or even telnet to see if you can connect to the remote host on port 80 or 443. If you can successfully connect using one of these methods, that may indicate that the issue is actually with the PHP script.
 
Unfortunately it also is failing on the commandline @mangelot . I did not open ports to the payment provider since it has to be done on IP level and i would need to unblock hosts.
 
Back
Top