Bad Practices for Websites
An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google and Yandex
45
2 min.

195
3 min.
You will need nginx, docker, and ufw to get started. Check to see if they are installed:
docker --version && nginx -v && sudo ufw status
If they are not yet installed, run the following commands:
sudo apt update && sudo apt install nginx docker.io ufw -y
Never work as the root user. Create a new user and grant them administrator privileges.
Adding a user:
adduser user # Replace ‘user’ with your name
The output will look like this:
Adding user ‘user’ ...Enter new UNIX password:(enter your password; characters will not be displayed).
Granting privileges and checking:
usermod -aG sudo user groups user
Expected output
user : user sudo.
This is the most reliable way to protect against brute force attacks.
If you already have an SSH key on your computer, simply send it to the server:
ssh-copy-id user@server_ip
If you don't have a key, create one:
ssh-keygen -t ed25519 -C "user@vps" # Then send it using the ssh-copy-id command above
When copying in this way, you may be required to enter the server password. For security reasons, the password will not be displayed when you enter it!
Disabling password login and root access
Now disable all login methods except for SSH keys.
Open the config file sudo nano /etc/ssh/sshd_config
Find and change (or add) the following lines:
PermitRootLogin no - prohibits direct login to the system as root via SSH;PasswordAuthentication no - Disables the ability to log in to the server using a regular password;ChallengeResponseAuthentication no - Disables challenge-response authentication;UsePAM no - Disables the use of the PAM (Pluggable Authentication Modules) module for SSH.Restart the service sudo systemctl restart ssh
Now, when you try to log in as root, you will see
root@ip: Permission denied (publickey).
The firewall blocks all ports except those that we allow.
For greater security, change the port for SSH to another one, and also add it to the UFW config!
sudo ufw enable sudo ufw allow 22/tcp sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw status
The output of the
statuscommand should be as follows:Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere
React2Shell is a critical vulnerability that allows hackers to execute their code on your server via React forms.
Check the list of processes and files. Suspicious signs:
ssh.sh, sex.sh, kai.tar.gz, httd.top or htop command.Update Next.js - urgently update to secure versions: 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7.
Node.js 24 - use the new Node permissions model to restrict file access.
Secure Docker:
--read-only flag.If you have been hacked - Remove infected subdirectories/containers, clear caches, and be sure to change all secret keys and passwords.
The article will be supplemented
An Analysis of Critical Web Design Mistakes. Why Sliders, Autoplay, and Slow-Loading Pages Reduce Conversion Rates and Rankings on Google and Yandex
45
2 min.
Troubleshooting Vite issues when using a VPN, configuring the connection to prevent local traffic from being redirected through the VPN tunnel
184
2 min.