Skip to content

Enhanced VPS security

Security settings you don't have to configure manually

After renting a VPS, you need to secure SSH access, set up a firewall, certificates, system DNS and timely updates. The 3X-UI AUTO NGINX installer handles these tasks during installation and offers additional security measures when you answer Y to Enhance VPS security? This is the recommended option, selected by default in the Russian-language menu.

These measures protect the VPS running 3x-ui, Xray and nginx. They complement the secure connections your users already have.

What the project configures

Feature What it does Why it matters
Fail2ban Monitors failed SSH logins and temporarily blocks repeated attempts Protects accounts against automated password guessing
Encrypted server DNS Configures Cloudflare and Google as global DNS resolvers over DNS-over-TLS (DoT) Protects global DNS queries against observation and tampering in transit to the DNS provider
Automatic security updates Configures the native APT and unattended-upgrades mechanisms for Ubuntu or Debian Updates vulnerable system packages, including nginx and the kernel
Reboot after updates Reboots the server at a scheduled time overnight when required Applies changes that need a fresh OS boot
Firewall (UFW) Allows required incoming connections and blocks other ports; preserves SSH access before enabling the firewall Reduces the number of publicly reachable services and protects the VPS against unwanted incoming connections without locking out the administrator
HTTPS and certificates Issues Let's Encrypt certificates and configures automatic renewal Protects connections to the panel, subscriptions and web services

The firewall restricts access to the server from the internet. A port scan cannot give an attacker access to services whose incoming connections are blocked. The installer also detects the current SSH port and allows it before enabling UFW, so you can continue managing your VPS.

Regardless of whether you choose enhanced security, the installer may prepare a 1 GiB swap file if no swap exists and the system is suitable. Swap helps when RAM runs low.

Conntrack is the Linux kernel's network connection tracking table. During Installation, Restore and Update, the project sets a minimum table size based on available RAM and retains any higher existing value. You normally do not need to change it manually.

Cover website protection: nginx rate-limits frequent HTTP requests to managed public websites and returns HTTP 429 if a limit is exceeded. These rules do not affect proxy connections or private services. More about nginx and connection options.

A real-world example: nginx security fixes in November 2026

On November 19 and 20, 2026, Ubuntu released nginx security updates for supported releases, including Ubuntu 24.04 and 26.04. The vulnerabilities affected HTTPS/TLS and request handling and could cause denial of service or data disclosure, depending on the issue and version. The updates were delivered through the standard package manager: USN-9159-1 and USN-9182-1.

On November 18, Ubuntu also fixed a needrestart vulnerability (USN-9151-1) that allowed a local user to escalate privileges. Fixes were released for Ubuntu 24.04 and 26.04.

Automatic OS security updates do not update 3X-UI AUTO NGINX itself. Use the separate project update for that.

This is why we configure automatic security updates. You do not need to check vulnerability notices and update system packages manually every day. The configured update policy checks the repositories and applies available security fixes automatically.

If your hosting provider has masked the standard APT automatic update timers or services, enabling enhanced security during installation or restore removes the persistent and runtime masks from those components. If configuration fails, it restores the previous masks, timer states and managed files. The final report tells you whether rollback was verified.

When updates run

All times are in the VPS's own time zone.

Time Action
02:30 Refresh package lists
02:50 Install security updates
04:38 Reboot if required after updates

Overnight reboot

If the system requires a reboot, it will reboot at 04:38 even if there are active connections. They will be interrupted while the VPS restarts. Keep this schedule in mind if the server serves users around the clock.

A closer look at DNS and SSH

DNS for the VPS itself and personal DNS for your devices are separate features. The former is part of enhanced security and protects the server's global DNS queries. The latter uses optional AdGuard Home and lets you filter queries from phones and computers. See the personal DNS guide for details.

SSH keys let you log in without your account password and complement Fail2ban. Once you have verified key-based access, you can disable password authentication to prevent SSH password guessing. The installer preserves existing login methods to avoid locking you out. The SSH keys guide shows two ways to set up a key: using Termius (recommended) or PowerShell on Windows 11. After verifying your key, we recommend disabling SSH password login.

What to check after installation

Start with the final installation report. If you need to check individual services, use the commands below. Connect via SSH and run sudo -i if necessary.

On the VPS as root:

systemctl is-active fail2ban
systemctl is-enabled apt-daily.timer apt-daily-upgrade.timer
systemctl list-timers apt-daily.timer apt-daily-upgrade.timer --no-pager
systemctl show -p Id -p LoadState apt-daily.service apt-daily-upgrade.service unattended-upgrades.service
resolvectl status

Expected results: fail2ban is active, both timers are enabled and appear in the schedule, and all three APT services show LoadState=loaded. In resolvectl status, the global resolvers should show DNS-over-TLS mode. DNS queries from individual network interfaces may use their own routes and settings.

Check the firewall separately, on the VPS as root:

ufw status verbose

If UFW is enabled, expect Status: active. Verify the allowed SSH port and the ports of required services. If UFW is inactive, do not count on it for protection. Do not enable the firewall blindly: check the SSH rules first. When changing rules, keep your current session open and verify a new SSH login.

Getting started · Add an SSH key · Personal DNS

Attribution and use of materials

© 2026 xPROMSx contributors · 3X-UI AUTO NGINX

Our material may be copied and distributed under the GNU GPL-3.0-only license, provided the attribution and link to the original are retained.

Original source: https://xpromsx.github.io/3x-ui-auto-nginx/guides/security/

Terms of use for project materials