Resolving Delays in cPFence Command Execution

If you notice that cPFence commands are taking an unusually long time to complete, this is likely due to a DNS resolution issue, where the server cannot smoothly reach cpfence.app. Here’s how to resolve this problem.

Identifying the Issue

When running a cPFence command, you may see extended completion times like the example below:

time cpfence --version
Current installed version: 3.2.9.1
Great! you are using the latest version of cPFence.

real    2m17.913s
user    0m0.126s
sys     0m0.227s

If you experience similar delays, updating your DNS settings can often resolve the issue.

Steps to Fix the Issue

  1. Update DNS Settings: Edit the /etc/systemd/resolved.conf file to use Google’s reliable DNS servers. Add the following line under the [Resolve] section:
DNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
  1. Restart the DNS Service: To apply the new DNS settings, restart the DNS service with the following command:
sudo systemctl restart systemd-resolved

This should significantly improve the command response time.

Verifying the Fix

After updating the DNS settings, try running a cPFence command again to check the response time:

time cpfence --version
Current installed version: 3.2.9.1
Great! You are using the latest version of cPFence.

real    0m0.405s
user    0m0.137s
sys     0m0.205s

The command should now complete much faster.


Need Further Assistance?

If you encounter any issues or need additional help, feel free to reach out to our support team via your client portal.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to Update cPFence Software & Signatures ?

cPFence software and virus signatures are automatically updated by default, ensuring continuous...

How to Know the Current Installed cPFence Version ?

To check the currently installed version of cPFence and see if an update is available, you can...

How to Uninstall cPFence ?

If you need to remove cPFence from your system, follow the steps below to uninstall the software....

Troubleshooting cPFence Email Notifications: Using SMTP and Local Mail

cPFence can now send email notifications either via the local mailx utility or through your SMTP...

How to Use My SMTP for cPFence Notifications?

cPFence allows you to use your own SMTP server to send email notifications, giving you more...