Are you receiving a VNC too many authentication failures error?
This error occurs when there are too many login failure attempts made to the VNC server.
At Bobcares, we often get requests from our customers to fix VNC errors as part of our Server Management Services.
Today, we’ll see the reasons for this error to occur and how our Support Engineers fix it.
Why does the authentication failure occurs in VNC?
We’ve seen many customers having a VNC encounter this error. The main reason for this error to occur is due to the bots.
Normally, when bots start crawling the internet they look for vulnerable servers to attack. They will try to brute force their way to the servers.
However, the server will detect that attack and as a result, it will close the VNC port to any new outside connections.
This is actually done to prevent the bots from brute force their way into the server. But on the other way, the customer itself will not be able to connect to the server instead receive the error.
How we fix the error VNC too many authentication failures?
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while manging the VNC system.
Often, customers get the following error when trying to access the VNC server. The error looks like “Authentication reason: Too many authentication failures”.
Now, let’s see the major reasons for this VNC authentication error to occur and how our Support Engineers fix it.
Solved VNC too many authentication failures error by killing the process
Recently, one of our customers had a problem while accessing the VNC server. He received an error “Authentication reason: Too many authentication failures”.
Our Supported Engineers started troubleshooting this problem by checking the process ids of VNC by running the command,
pgrep vnc
As a result, we found the PIDs that were causing the problem. Now, we had to kill those processes. So, we ran the below command by replacing the PID with the output of the above command.
kill PID
Also, to make the VNC up and running again, we ran the following command.
vncserver -geometry 1920x1080
Restrict access using firewall
As this error occurs due to too many login attempts to the server we avoid it by using a firewall.
For that, we use the following steps.
For iptables,
1. Firstly, we log into the server as a root user.
2. Then, we add the public address of the computer that the customer was currently using to the firewall rules.
iptables -I INPUT -p tcp -s your ip --dport 5901 -j ACCEPT
Normally, VNC uses the port structure 5900+N and N represents the display number for the VNC service.
3. To reject all other IP addresses, we add the following rule.
iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 5901 -j DROP
And that’s it! Now the customer can use the server without having to worry about bots attacking the server.
[Having trouble with VNC related errors? We’ll fix it for you.]
Conclusion
In today’s article, VNC too many authentication failures error can happen due to too many failed login attempts to the VNC server. Today, we saw how our Supported Engineers fixed this error.
0 Comments