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
- 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
- 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.