Turns out, I was blocking xmlrpc.php in my Nginx configuration. After unblocking it, I was able to connect to facebook.
Now, my question is, how can I allow jetpack and facebook to user xmlrpc.php while blocking everything else within nginx?
My Nginx Blocking configuration looks like this:
location ~ /xmlrpc.php$ {
allow 192.168.1.0/24; # LAN IP Address
allow 109.54.345.53/32; # Public IP Address
deny all;
# Pass FastCGI to PHP8.1 by including the below snippets.
include /etc/nginx/snippets/fastcgi-php.conf;
How can I modify it so it still blocks everything except: LAN IP ADDRESS, Public IP Address, Facebook or Jetpack social connect ?
Thanks
Hey @danrancan – Yes if XML-RPC for the site is not working properly then it can create issues for Jetpack in working on your site.
You can allowlist the Jetpack IPs that Jetpack uses to establish a connection with your site. Whitelisting these IPs ensures that Jetpack can communicate with your site without any restrictions. You can find the complete list of Jetpack’s IP addresses here: https://jetpack.com/support/how-to-add-jetpack-ips-allowlist/#jetpack-ips
Once you have added these IPs to your allowlist, Jetpack should be able to connect without encountering any issues related to network restrictions. If you continue to face any connectivity problems, please let us know, and we’ll be happy to assist further.
I’m having the same problem. I’ve changed the allowed IP address list and it still won’t connect. I get an error saying “contact support.”
Thanks you.
Solved. plugin reinstalation solved
-
This reply was modified 1 year, 3 months ago by
tudesguace.
Hi @danrancan,
I’m glad to hear that unblocking xmlrpc.php helped resolve the initial issue! Regarding your next question—how to allow Jetpack and Facebook access while still blocking everything else—this will depend on how strict you want your security rules to be.
Since Jetpack needs access to xmlrpc.php for features like Jetpack Social, I’d recommend allowlisting Jetpack’s IPs in addition to your LAN and public IP. You can find the complete list of Jetpack’s IPs on the page linked earlier, here:
https://jetpack.com/support/how-to-add-jetpack-ips-allowlist/
Beyond Nginx, please also check if any security plugins might still be blocking xmlrpc.php. Even if Nginx allows it, some plugins override server settings. Additionally, if you use Cloudflare or Sucuri, they might have firewall rules that need adjusting.
Since configuring Nginx rules is specific to your server setup, I’d recommend consulting with your hosting provider or a system administrator to ensure that only the necessary services can access xmlrpc.php securely.
@tudesguace – I appreciate you chiming in! Since each site’s setup can be different and per forum guidelines, could you please open a new thread for your issue? That way, we can investigate your case individually.
Best regards,
Alin