Control Web Panel

Developers => CWP API => Topic started by: yasyas101 on December 25, 2022, 04:08:15 PM

Title: API connection refused from another server only
Post by: yasyas101 on December 25, 2022, 04:08:15 PM
Hi,

I use the API to create accounts and it's working fine from localhost. I used an API key with IP set as * and also another API key with IP set to the other server IP that accesses the API.

The one with * works from localhost and not from server. From server I get "connection refused"

I checked the topic https://forum.centos-webpanel.com/index.php?topic=7844.0 but that's not my issue.

I have port 2304 added to IP4 and IP6 on CSF firewall.

I have another vps with CWP and CSF is off. There it works.
On the new one I'm using CSF so I'm suspecting it's this. What else can I try?

PS. Devs, please remove Captcha, it's the most horrible thing you can do to your visitors. The math sum should be sufficient
Title: Re: API connection refused from another server only
Post by: yasyas101 on December 25, 2022, 04:50:04 PM
Update: CSF turned off, server rebooted and still connection refused issue with API requests.
Title: Re: API connection refused from another server only
Post by: yasyas101 on December 25, 2022, 05:24:48 PM
This is horrible. 2 days spent on this already.

I have 2 VPS - both configured almost identical with 2 different domains. Both domains configured same on DNS.

The server that I'm using the API from is also whitelisted on CSF. Logs don't show anything (access logs and CWP's API logs)

I'm absolutely stumped. What am I missing?
Title: Re: API connection refused from another server only
Post by: yasyas101 on December 25, 2022, 09:36:24 PM
SOLVED:

It was the server sending the requests. The host blocked port 2304 as a non-standard port. Once unblocked, no more connection refused.

CWP Devs, please remove the torturous Captcha.. i'm sick of selecting bridges, traffic lights and crosswalks. Use a better one, this one is the worst thing on the internet after cookie notices.