{"id":120368,"date":"2025-10-24T15:23:56","date_gmt":"2025-10-24T08:23:56","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=120368"},"modified":"2026-10-22T12:16:01","modified_gmt":"2026-10-22T05:16:01","slug":"bao-mat-vps-ubuntu","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/bao-mat-vps-ubuntu\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn b\u1ea3o m\u1eadt VPS Ubuntu 24.04 t\u1eebng b\u01b0\u1edbc (c\u00f3 l\u1ec7nh ki\u1ec3m tra)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>B\u1ea3o m\u1eadt VPS Ubuntu l\u00e0 \u0111\u00f3ng c\u00e1c \u0111\u01b0\u1eddng v\u00e0o kh\u00f4ng c\u1ea7n thi\u1ebft v\u00e0 ghi l\u1ea1i m\u1ecdi thay \u0111\u1ed5i quan tr\u1ecdng tr\u00ean m\u00e1y ch\u1ee7.<\/strong> Tr\u00ean Ubuntu 24.04 LTS, th\u1ee9 t\u1ef1 an to\u00e0n l\u00e0: c\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng, t\u1ea1o user sudo, \u0111\u0103ng nh\u1eadp b\u1eb1ng SSH key ed25519, t\u1eaft m\u1eadt kh\u1ea9u v\u00e0 root qua SSH. Sau \u0111\u00f3 b\u1eadt UFW (m\u1edf SSH tr\u01b0\u1edbc), c\u00e0i Fail2ban, ki\u1ec3m tra c\u1eadp nh\u1eadt t\u1ef1 \u0111\u1ed9ng, gi\u1eef AppArmor, b\u1eadt auditd v\u00e0 r\u00e0 c\u1ed5ng \u0111ang m\u1edf.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Checklist chung cho <a href=\"https:\/\/tino.vn\/blog\/vps-la-gi\/\">m\u00e1y ch\u1ee7 \u1ea3o VPS<\/a> Linux v\u00e0 Windows Server n\u1eb1m \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/bao-mat-vps\/\">b\u1ea3o m\u1eadt VPS<\/a>; b\u00e0i n\u00e0y l\u00e0 l\u1ec7nh chi ti\u1ebft cho Ubuntu. Ch\u1ec9 sang b\u01b0\u1edbc sau khi l\u1ec7nh ki\u1ec3m tra c\u1ee7a b\u01b0\u1edbc tr\u01b0\u1edbc cho k\u1ebft qu\u1ea3 \u0111\u00fang.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Phi\u00ean b\u1ea3n:<\/strong> Ubuntu 24.04 LTS, h\u1ed7 tr\u1ee3 b\u1ea3o m\u1eadt ti\u00eau chu\u1ea9n \u0111\u1ebfn 05\/2029. Ubuntu 26.04 LTS ra m\u1eaft 04\/2026; Ubuntu 20.04 \u0111\u00e3 h\u1ebft h\u1ed7 tr\u1ee3 ti\u00eau chu\u1ea9n t\u1eeb 05\/2025 (<a href=\"https:\/\/ubuntu.com\/about\/release-cycle\" rel=\"nofollow noopener\" target=\"_blank\">chu k\u1ef3 ph\u00e1t h\u00e0nh Ubuntu<\/a>, truy c\u1eadp 21\/10\/2026), n\u00ean n\u00e2ng c\u1ea5p ho\u1eb7c c\u00e0i l\u1ea1i tr\u01b0\u1edbc.<\/li>\n\n\n<li><strong>Gi\u1ea3 \u0111\u1ecbnh:<\/strong> VPS m\u1edbi c\u00e0i, \u0111\u0103ng nh\u1eadp l\u1ea7n \u0111\u1ea7u b\u1eb1ng root v\u00e0 m\u1eadt kh\u1ea9u nh\u00e0 cung c\u1ea5p g\u1eedi, ch\u1ea1y web qua Nginx ho\u1eb7c Apache.<\/li>\n\n\n<li><strong>\u0110\u01b0\u1eddng lui:<\/strong> bi\u1ebft m\u1edf console \u1edf trang qu\u1ea3n tr\u1ecb c\u1ee7a nh\u00e0 cung c\u1ea5p (v\u00ed d\u1ee5 Web Console noVNC); console v\u1eabn v\u00e0o \u0111\u01b0\u1ee3c khi SSH b\u1ecb ch\u1eb7n.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"B\u1ea3o_m\u1eadt_VPS_Ubuntu_24.04_g\u1ed3m_nh\u1eefng_b\u01b0\u1edbc_n\u00e0o?\">B\u1ea3o m\u1eadt VPS Ubuntu 24.04 g\u1ed3m nh\u1eefng b\u01b0\u1edbc n\u00e0o?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea3o m\u1eadt VPS Ubuntu 24.04 g\u1ed3m 9 b\u01b0\u1edbc, l\u00e0m theo nguy\u00ean t\u1eafc: t\u1ea1o \u0111\u01b0\u1eddng \u0111\u0103ng nh\u1eadp m\u1edbi v\u00e0 th\u1eed th\u00e0nh c\u00f4ng, r\u1ed3i m\u1edbi \u0111\u00f3ng \u0111\u01b0\u1eddng c\u0169. SSH key ph\u1ea3i ch\u1ea1y \u0111\u01b0\u1ee3c tr\u01b0\u1edbc khi t\u1eaft m\u1eadt kh\u1ea9u, quy t\u1eafc m\u1edf c\u1ed5ng SSH ph\u1ea3i c\u00f3 tr\u01b0\u1edbc khi b\u1eadt UFW, v\u00e0 gi\u1eef phi\u00ean SSH \u0111ang m\u1edf cho \u0111\u1ebfn khi phi\u00ean m\u1edbi \u0111\u0103ng nh\u1eadp \u0111\u01b0\u1ee3c.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-lop-bao-ve.webp\" alt=\"S\u01a1 \u0111\u1ed3 l\u1edbp b\u1ea3o v\u1ec7 VPS Ubuntu: l\u01b0u l\u01b0\u1ee3ng t\u1eeb Internet (bot qu\u00e9t c\u1ed5ng, bot d\u00f2 m\u1eadt kh\u1ea9u SSH, khai th\u00e1c l\u1ed7 h\u1ed5ng) \u0111i qua 6 l\u1edbp: 1 t\u01b0\u1eddng l\u1eeda nh\u00e0 cung c\u1ea5p l\u1ecdc tr\u01b0\u1edbc khi t\u1edbi VPS; 2 UFW ch\u1eb7n m\u1ecdi c\u1ed5ng tr\u1eeb SSH v\u00e0 80\/443, SSH gi\u1edbi h\u1ea1n t\u1ea7n su\u1ea5t, ki\u1ec3m b\u1eb1ng ufw status verbose; 3 OpenSSH ch\u1ec9 nh\u1eadn key, root kh\u00f4ng \u0111\u0103ng nh\u1eadp tr\u1ef1c ti\u1ebfp, ki\u1ec3m b\u1eb1ng sshd -T; 4 Fail2ban c\u1ea5m t\u1ea1m IP sai nhi\u1ec1u l\u1ea7n, c\u1ea5m l\u00e2u IP t\u00e1i ph\u1ea1m; 5 user sudo c\u00f3 log theo t\u1eebng ng\u01b0\u1eddi; 6 AppArmor v\u00e0 auditd h\u1ea1n ch\u1ebf d\u1ecbch v\u1ee5 b\u1ecb khai th\u00e1c lan r\u1ed9ng, ghi l\u1ea1i thay \u0111\u1ed5i file quan tr\u1ecdng. Ch\u1ea1y song song m\u1ecdi l\u1edbp: c\u1eadp nh\u1eadt t\u1ef1 \u0111\u1ed9ng, r\u00e0 c\u1ed5ng b\u1eb1ng ss -tulpn, sao l\u01b0u ra ngo\u00e0i VPS\" class=\"wp-image-131324\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-lop-bao-ve.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-lop-bao-ve-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-lop-bao-ve-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-lop-bao-ve-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_C\u1eadp_nh\u1eadt_Ubuntu_v\u00e0_ki\u1ec3m_tra_phi\u00ean_b\u1ea3n\">B\u01b0\u1edbc 1: C\u1eadp nh\u1eadt Ubuntu v\u00e0 ki\u1ec3m tra phi\u00ean b\u1ea3n<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u1eadp nh\u1eadt to\u00e0n b\u1ed9 g\u00f3i l\u00e0 vi\u1ec7c \u0111\u1ea7u ti\u00ean tr\u00ean VPS Ubuntu m\u1edbi, v\u00ec image c\u00e0i s\u1eb5n th\u01b0\u1eddng c\u0169 h\u01a1n b\u1ea3n v\u00e1 hi\u1ec7n t\u1ea1i. Ki\u1ec3m tra th\u00eam phi\u00ean b\u1ea3n Ubuntu, \u0111\u1ed3ng h\u1ed3 h\u1ec7 th\u1ed1ng (log sai gi\u1edd kh\u00f3 \u0111i\u1ec1u tra) v\u00e0 m\u00e1y c\u00f3 c\u1ea7n kh\u1edfi \u0111\u1ed9ng l\u1ea1i kh\u00f4ng.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Phi\u00ean b\u1ea3n Ubuntu\ncat \/etc\/os-release | grep -E '^(NAME|VERSION)='\n\n# C\u1eadp nh\u1eadt to\u00e0n b\u1ed9 g\u00f3i\nsudo apt update &amp;&amp; sudo apt upgrade -y\n\n# File n\u00e0y t\u1ed3n t\u1ea1i ngh\u0129a l\u00e0 c\u1ea7n kh\u1edfi \u0111\u1ed9ng l\u1ea1i \u0111\u1ec3 n\u1ea1p kernel ho\u1eb7c th\u01b0 vi\u1ec7n m\u1edbi\n# VPS s\u1ebd kh\u1edfi \u0111\u1ed9ng l\u1ea1i: \u0111\u1ee3i 1\u20132 ph\u00fat r\u1ed3i SSH l\u1ea1i b\u1eb1ng root\nls \/var\/run\/reboot-required &amp;&amp; sudo reboot\n\n# \u0110\u1ed3ng h\u1ed3: d\u00f2ng \"System clock synchronized\" ph\u1ea3i l\u00e0 yes\ntimedatectl status\nsudo timedatectl set-timezone Asia\/Ho_Chi_Minh<\/code><\/pre>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_T\u1ea1o_user_sudo_thay_cho_root\">B\u01b0\u1edbc 2: T\u1ea1o user sudo thay cho root<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">User sudo l\u00e0 t\u00e0i kho\u1ea3n th\u01b0\u1eddng \u0111\u01b0\u1ee3c ch\u1ea1y l\u1ec7nh qu\u1ea3n tr\u1ecb khi g\u00f5 <code>sudo<\/code>, n\u00ean m\u1ed7i l\u1ec7nh qu\u1ea3n tr\u1ecb \u0111\u1ec1u c\u00f3 ch\u1ee7 \u0111\u00edch v\u00e0 \u0111\u01b0\u1ee3c ghi log. Root v\u1eabn t\u1ed3n t\u1ea1i, ch\u1ec9 kh\u00f4ng \u0111\u0103ng nh\u1eadp tr\u1ef1c ti\u1ebfp qua SSH n\u1eefa (b\u01b0\u1edbc 4).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u0110ang \u0111\u0103ng nh\u1eadp root: t\u1ea1o user (thay tenban b\u1eb1ng t\u00ean c\u1ee7a b\u1ea1n) v\u00e0 c\u1ea5p quy\u1ec1n sudo\nadduser tenban\nusermod -aG sudo tenban\n\n# Ki\u1ec3m tra: d\u00f2ng k\u1ebft qu\u1ea3 ph\u1ea3i c\u00f3 \"sudo\"\ngroups tenban<\/code><\/pre>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_\u0110\u0103ng_nh\u1eadp_b\u1eb1ng_SSH_key_ed25519\">B\u01b0\u1edbc 3: \u0110\u0103ng nh\u1eadp b\u1eb1ng SSH key ed25519<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SSH key l\u00e0 c\u1eb7p kho\u00e1 d\u00f9ng thay m\u1eadt kh\u1ea9u khi \u0111\u0103ng nh\u1eadp qua <a href=\"https:\/\/tino.vn\/blog\/ssh-la-gi\/\">giao th\u1ee9c SSH<\/a>: kho\u00e1 ri\u00eang n\u1eb1m tr\u00ean m\u00e1y c\u1ee7a b\u1ea1n, kho\u00e1 c\u00f4ng khai \u0111\u1eb7t tr\u00ean VPS. T\u00e0i li\u1ec7u <a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/security\/openssh-server\/\" rel=\"nofollow noopener\" target=\"_blank\">OpenSSH server c\u1ee7a Ubuntu<\/a> khuy\u1ebfn ngh\u1ecb ed25519. T\u1ea1o key tr\u00ean m\u00e1y c\u00e1 nh\u00e2n, kh\u00f4ng t\u1ea1o tr\u00ean VPS, v\u00e0 \u0111\u1eb7t passphrase cho kho\u00e1 ri\u00eang. Xem th\u00eam <a href=\"https:\/\/tino.vn\/blog\/ssh-key-la-gi\/\">SSH key l\u00e0 g\u00ec<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Tr\u00ean m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n (macOS, Linux, Windows 10\/11 \u0111\u1ec1u c\u00f3 s\u1eb5n OpenSSH)\nssh-keygen -t ed25519 -C \"tenban@laptop\"\n\n# Ch\u00e9p kho\u00e1 c\u00f4ng khai l\u00ean VPS: macOS, Linux\nssh-copy-id tenban@IP_VPS\n\n# Windows PowerShell kh\u00f4ng c\u00f3 ssh-copy-id, d\u00f9ng l\u1ec7nh n\u00e0y thay th\u1ebf\ntype $env:USERPROFILE\\.ssh\\id_ed25519.pub | ssh tenban@IP_VPS \"mkdir -p ~\/.ssh &amp;&amp; chmod 700 ~\/.ssh &amp;&amp; cat &gt;&gt; ~\/.ssh\/authorized_keys &amp;&amp; chmod 600 ~\/.ssh\/authorized_keys\"\n\n# M\u1edf c\u1eeda s\u1ed5 terminal M\u1edaI, th\u1eed \u0111\u0103ng nh\u1eadp b\u1eb1ng key\nssh tenban@IP_VPS\nsudo whoami      # k\u1ebft qu\u1ea3 ph\u1ea3i l\u00e0 root<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">RSA 4096 (<code>ssh-keygen -t rsa -b 4096<\/code>) v\u1eabn d\u00f9ng \u0111\u01b0\u1ee3c, nh\u01b0ng ed25519 \u0111\u01b0\u1ee3c khuy\u1ebfn ngh\u1ecb. VPS t\u1ea1i Tino c\u00f3 th\u1ec3 <a href=\"https:\/\/tino.vn\/blog\/docs\/them-key-ssh-vao-vps-thong-qua-tino-panel\/\">th\u00eam SSH key qua Tino Panel<\/a>. C\u00e1ch m\u1edf phi\u00ean SSH t\u1eeb Windows, macOS v\u00e0 x\u1eed l\u00fd l\u1ed7i k\u1ebft n\u1ed1i: xem <a href=\"https:\/\/tino.vn\/blog\/cach-ket-noi-vps\/\">c\u00e1ch k\u1ebft n\u1ed1i VPS<\/a>.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_T\u1eaft_\u0111\u0103ng_nh\u1eadp_b\u1eb1ng_m\u1eadt_kh\u1ea9u_v\u00e0_root_trong_sshd_config.d\">B\u01b0\u1edbc 4: T\u1eaft \u0111\u0103ng nh\u1eadp b\u1eb1ng m\u1eadt kh\u1ea9u v\u00e0 root trong sshd_config.d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu 24.04 n\u1ea1p c\u00e1c file trong <code>\/etc\/ssh\/sshd_config.d\/<\/code> tr\u01b0\u1edbc n\u1ed9i dung ch\u00ednh c\u1ee7a <code>sshd_config<\/code> (c\u00f9ng t\u00e0i li\u1ec7u OpenSSH c\u1ee7a Ubuntu \u1edf b\u01b0\u1edbc 3). OpenSSH d\u00f9ng gi\u00e1 tr\u1ecb \u0111\u1ea7u ti\u00ean \u0111\u1ecdc \u0111\u01b0\u1ee3c cho m\u1ed7i tu\u1ef3 ch\u1ecdn (<a href=\"https:\/\/man.openbsd.org\/sshd_config\" rel=\"nofollow noopener\" target=\"_blank\">man sshd_config<\/a>). M\u1ed9t s\u1ed1 image VPS c\u00f3 s\u1eb5n file <code>50-cloud-init.conf<\/code> b\u1eadt l\u1ea1i <code>PasswordAuthentication yes<\/code>, n\u00ean h\u00e3y \u0111\u1eb7t file c\u1ee7a b\u1ea1n v\u1edbi s\u1ed1 nh\u1ecf h\u01a1n.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Xem c\u00f3 file n\u00e0o \u0111ang b\u1eadt \u0111\u0103ng nh\u1eadp m\u1eadt kh\u1ea9u kh\u00f4ng\nsudo grep -ri passwordauthentication \/etc\/ssh\/sshd_config \/etc\/ssh\/sshd_config.d\/\n\nsudo tee \/etc\/ssh\/sshd_config.d\/01-bao-mat.conf &gt; \/dev\/null &lt;&lt;'EOF'\nPasswordAuthentication no\nKbdInteractiveAuthentication no\nPermitRootLogin no\nAllowUsers tenban\nMaxAuthTries 3\nX11Forwarding no\nEOF\n\n# Ki\u1ec3m tra c\u00fa ph\u00e1p, r\u1ed3i xem gi\u00e1 tr\u1ecb th\u1ef1c t\u1ebf \u0111ang c\u00f3 hi\u1ec7u l\u1ef1c\nsudo sshd -t\nsudo sshd -T | grep -Ei '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin|allowusers|maxauthtries)'\n\nsudo systemctl restart ssh.service<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>AllowUsers<\/code> ch\u1ec9 cho c\u00e1c user \u0111\u01b0\u1ee3c li\u1ec7t k\u00ea \u0111\u0103ng nh\u1eadp qua SSH; th\u00eam ng\u01b0\u1eddi qu\u1ea3n tr\u1ecb th\u00ec th\u00eam t\u00ean v\u00e0o d\u00f2ng n\u00e0y. Gi\u1eef phi\u00ean SSH hi\u1ec7n t\u1ea1i, m\u1edf phi\u00ean m\u1edbi \u0111\u1ec3 th\u1eed. <code>ssh root@IP_VPS<\/code> ph\u1ea3i b\u1ecb t\u1eeb ch\u1ed1i.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_5:_B\u1eadt_UFW_\u0111\u00fang_th\u1ee9_t\u1ef1\">B\u01b0\u1edbc 5: B\u1eadt UFW \u0111\u00fang th\u1ee9 t\u1ef1<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">UFW l\u00e0 c\u00f4ng c\u1ee5 <a href=\"https:\/\/tino.vn\/blog\/firewall-tuong-lua-la-gi\/\">t\u01b0\u1eddng l\u1eeda (firewall)<\/a> m\u1eb7c \u0111\u1ecbnh c\u1ee7a Ubuntu. Th\u1ee9 t\u1ef1 \u0111\u00fang l\u00e0 \u0111\u1eb7t m\u1eb7c \u0111\u1ecbnh ch\u1eb7n k\u1ebft n\u1ed1i v\u00e0o, m\u1edf SSH, m\u1edf c\u1ed5ng web, r\u1ed3i m\u1edbi b\u1eadt (<a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/security\/firewalls\/\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu Server docs<\/a>). Quy t\u1eafc <code>limit<\/code> v\u1eabn cho ph\u00e9p SSH nh\u01b0ng t\u1eeb ch\u1ed1i IP m\u1edf t\u1eeb 6 k\u1ebft n\u1ed1i tr\u1edf l\u00ean trong 30 gi\u00e2y (<a href=\"https:\/\/manpages.ubuntu.com\/manpages\/noble\/man8\/ufw.8.html\" rel=\"nofollow noopener\" target=\"_blank\">man ufw<\/a>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw default deny incoming\nsudo ufw default allow outgoing\nsudo ufw limit OpenSSH          # m\u1edf SSH (c\u1ed5ng 22) k\u00e8m gi\u1edbi h\u1ea1n t\u1ea7n su\u1ea5t, l\u00e0m TR\u01af\u1edaC\nsudo ufw allow 80\/tcp\nsudo ufw allow 443\/tcp\nsudo ufw enable\nsudo ufw status verbose<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IP nh\u00e0 ho\u1eb7c v\u0103n ph\u00f2ng c\u1ed1 \u0111\u1ecbnh:<\/strong> ch\u1ec9 cho ph\u00e9p IP \u0111\u00f3 v\u00e0o SSH b\u1eb1ng <code>sudo ufw allow from IP_CUA_BAN to any port 22 proto tcp<\/code>. Th\u1eed \u0111\u0103ng nh\u1eadp \u0111\u01b0\u1ee3c r\u1ed3i m\u1edbi xo\u00e1 quy t\u1eafc <code>OpenSSH<\/code> c\u0169 (<code>sudo ufw status numbered<\/code>, r\u1ed3i <code>sudo ufw delete SO<\/code>).<\/li>\n\n\n<li><strong>IPv6:<\/strong> UFW \u00e1p quy t\u1eafc cho c\u1ea3 IPv6 khi <code>IPV6=yes<\/code> trong <code>\/etc\/default\/ufw<\/code>. Ki\u1ec3m tra d\u00f2ng n\u00e0y n\u1ebfu VPS c\u00f3 IPv6.<\/li>\n\n\n<li><strong>Docker:<\/strong> c\u1ed5ng do Docker publish \u0111i qua quy t\u1eafc ri\u00eang, kh\u00f4ng b\u1ecb UFW ch\u1eb7n (<a href=\"https:\/\/docs.docker.com\/engine\/network\/packet-filtering-firewalls\/\" rel=\"nofollow noopener\" target=\"_blank\">t\u00e0i li\u1ec7u Docker<\/a>). Publish c\u1ed5ng n\u1ed9i b\u1ed9 v\u00e0o <code>127.0.0.1<\/code>, v\u00ed d\u1ee5 <code>-p 127.0.0.1:5678:5678<\/code>, r\u1ed3i \u0111\u01b0a ra ngo\u00e0i qua reverse proxy.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_6:_C\u00e0i_Fail2ban_v\u00e0_c\u1ea5u_h\u00ecnh_jail_cho_SSH\">B\u01b0\u1edbc 6: C\u00e0i Fail2ban v\u00e0 c\u1ea5u h\u00ecnh jail cho SSH<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/fail2ban\/fail2ban\" rel=\"nofollow noopener\" target=\"_blank\">Fail2ban<\/a> \u0111\u1ecdc log \u0111\u0103ng nh\u1eadp v\u00e0 t\u1ea1m ch\u1eb7n IP th\u1ea5t b\u1ea1i nhi\u1ec1u l\u1ea7n b\u1eb1ng t\u01b0\u1eddng l\u1eeda. Khi \u0111\u00e3 t\u1eaft m\u1eadt kh\u1ea9u, Fail2ban ch\u1ee7 y\u1ebfu gi\u1ea3m log r\u00e1c v\u00e0 t\u1ea3i do bot d\u00f2, v\u00e0 d\u00f9ng l\u1ea1i \u0111\u01b0\u1ee3c cho Nginx, WordPress. Kh\u00f4ng s\u1eeda <code>jail.conf<\/code>; \u0111\u1eb7t c\u1ea5u h\u00ecnh ri\u00eang trong <code>jail.local<\/code> ho\u1eb7c <code>jail.d\/<\/code>. CrowdSec l\u00e0 c\u00f4ng c\u1ee5 c\u00f9ng lo\u1ea1i d\u00f9ng danh s\u00e1ch ch\u1eb7n chia s\u1ebb; b\u00e0i n\u00e0y d\u00f9ng Fail2ban v\u00ec c\u00f3 s\u1eb5n trong kho Ubuntu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-fail2ban.webp\" alt=\"Lu\u1ed3ng Fail2ban ch\u1eb7n IP tr\u00ean Ubuntu 24.04: jail sshd \u0111\u1ecdc systemd journal (backend = systemd m\u1eb7c \u0111\u1ecbnh trong defaults-debian.conf, kh\u00f4ng c\u1ea7n auth.log), \u0111\u1ebfm maxretry 5 l\u1ea7n sai trong findtime 10 ph\u00fat t\u1eeb c\u00f9ng IP, c\u1ea5m 1 gi\u1edd b\u1eb1ng quy t\u1eafc t\u01b0\u1eddng l\u1eeda v\u00e0 ghi d\u00f2ng Ban v\u00e0o \/var\/log\/fail2ban.log; jail recidive ph\u1ea3i ghi backend = auto v\u00e0 logpath = \/var\/log\/fail2ban.log, IP b\u1ecb Ban 5 l\u1ea7n trong 1 ng\u00e0y b\u1ecb c\u1ea5m 1 tu\u1ea7n; ki\u1ec3m tra b\u1eb1ng fail2ban-client -t r\u1ed3i fail2ban-client status recidive, File list ph\u1ea3i c\u00f3 fail2ban.log\" class=\"wp-image-131323\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-fail2ban.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-fail2ban-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-fail2ban-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-fail2ban-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install fail2ban -y\n\nsudo tee \/etc\/fail2ban\/jail.local &gt; \/dev\/null &lt;&lt;'EOF'\n[DEFAULT]\n# Thay IP_CUA_BAN b\u1eb1ng IP th\u1eadt; kh\u00f4ng c\u00f3 IP c\u1ed1 \u0111\u1ecbnh th\u00ec xo\u00e1 ch\u1eef IP_CUA_BAN\nignoreip = 127.0.0.1\/8 ::1 IP_CUA_BAN\nbantime  = 1h\nfindtime = 10m\nmaxretry = 5\n\n[sshd]\nenabled = true\n# port = 2222   (b\u1ecf d\u1ea5u # n\u1ebfu \u0111\u00e3 \u0111\u1ed5i c\u1ed5ng SSH)\n\n# Ch\u1eb7n l\u00e2u h\u01a1n IP b\u1ecb ch\u1eb7n l\u1eb7p l\u1ea1i nhi\u1ec1u l\u1ea7n (\u0111\u1ecdc file log c\u1ee7a ch\u00ednh Fail2ban)\n[recidive]\nenabled  = true\nbackend  = auto\nlogpath  = \/var\/log\/fail2ban.log\nbantime  = 1w\nfindtime = 1d\nEOF\n\nsudo fail2ban-client -t        # ki\u1ec3m tra c\u00fa ph\u00e1p tr\u01b0\u1edbc khi kh\u1edfi \u0111\u1ed9ng l\u1ea1i\nsudo systemctl enable --now fail2ban\nsudo systemctl restart fail2ban\nsudo fail2ban-client status\nsudo fail2ban-client status sshd\n# D\u00f2ng \"File list\" ph\u1ea3i c\u00f3 \/var\/log\/fail2ban.log\nsudo fail2ban-client status recidive<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu 24.04 \u0111\u1eb7t s\u1eb5n <code>backend = systemd<\/code> trong <code>\/etc\/fail2ban\/jail.d\/defaults-debian.conf<\/code>, n\u00ean jail sshd \u0111\u1ecdc journal, kh\u00f4ng c\u1ea7n <code>\/var\/log\/auth.log<\/code>. Jail \u0111\u1ecdc file log ri\u00eang (recidive, Nginx) ph\u1ea3i ghi <code>backend = auto<\/code> k\u00e8m <code>logpath<\/code>, n\u1ebfu kh\u00f4ng jail b\u00e1o \u0111ang ch\u1ea1y nh\u01b0ng kh\u00f4ng bao gi\u1edd ch\u1eb7n. B\u1ecf ch\u1eb7n IP b\u1ecb kho\u00e1 nh\u1ea7m: <code>sudo fail2ban-client set sshd unbanip IP<\/code>.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_7:_Ki\u1ec3m_tra_c\u1eadp_nh\u1eadt_b\u1ea3o_m\u1eadt_t\u1ef1_\u0111\u1ed9ng_(unattended-upgrades)\">B\u01b0\u1edbc 7: Ki\u1ec3m tra c\u1eadp nh\u1eadt b\u1ea3o m\u1eadt t\u1ef1 \u0111\u1ed9ng (unattended-upgrades)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">G\u00f3i <code>unattended-upgrades<\/code> \u0111\u01b0\u1ee3c c\u00e0i s\u1eb5n tr\u00ean Ubuntu v\u00e0 m\u1eb7c \u0111\u1ecbnh ch\u1ec9 t\u1ef1 c\u00e0i b\u1ea3n v\u00e1 b\u1ea3o m\u1eadt (<a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/software\/automatic-updates\/\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu Server docs<\/a>). G\u00f3i n\u00e0y kh\u00f4ng t\u1ef1 kh\u1edfi \u0111\u1ed9ng l\u1ea1i m\u00e1y (<code>Automatic-Reboot \"false\"<\/code>), n\u00ean b\u1ea3n v\u00e1 kernel ch\u1ec9 c\u00f3 hi\u1ec7u l\u1ef1c sau khi b\u1ea1n reboot; b\u1ea3n s\u1eeda l\u1ed7i kh\u00f4ng ph\u1ea3i b\u1ea3o m\u1eadt v\u1eabn c\u1ea7n <code>apt upgrade<\/code> \u0111\u1ecbnh k\u1ef3.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Hai d\u00f2ng trong file n\u00e0y ph\u1ea3i c\u00f3 gi\u00e1 tr\u1ecb \"1\"\ncat \/etc\/apt\/apt.conf.d\/20auto-upgrades\n\n# N\u1ebfu ch\u01b0a b\u1eadt\nsudo dpkg-reconfigure -plow unattended-upgrades\n\n# Ch\u1ea1y th\u1eed, kh\u00f4ng thay \u0111\u1ed5i g\u00ec\nsudo unattended-upgrade -v --dry-run\n\n# Log m\u1ed7i l\u1ea7n ch\u1ea1y\nls \/var\/log\/unattended-upgrades\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n t\u1ef1 kh\u1edfi \u0111\u1ed9ng l\u1ea1i v\u00e0o gi\u1edd \u00edt truy c\u1eadp (ch\u1ec9 khi website ch\u1ecbu \u0111\u01b0\u1ee3c v\u00e0i ph\u00fat gi\u00e1n \u0111o\u1ea1n), s\u1eeda trong <code>\/etc\/apt\/apt.conf.d\/50unattended-upgrades<\/code>: <code>Unattended-Upgrade::Automatic-Reboot \"true\";<\/code> v\u00e0 <code>Unattended-Upgrade::Automatic-Reboot-Time \"03:00\";<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea3n v\u00e1 kernel nghi\u00eam tr\u1ecdng kh\u00f4ng c\u1ea7n ch\u1edd reboot n\u1ebfu d\u00f9ng Canonical Livepatch: d\u1ecbch v\u1ee5 v\u00e1 kernel khi m\u00e1y \u0111ang ch\u1ea1y, mi\u1ec5n ph\u00ed cho t\u1ed1i \u0111a 5 m\u00e1y d\u00f9ng c\u00e1 nh\u00e2n qua Ubuntu Pro (<code>sudo pro attach TOKEN<\/code>, r\u1ed3i <code>sudo pro enable livepatch<\/code>; <a href=\"https:\/\/ubuntu.com\/security\/livepatch\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu Livepatch<\/a>, truy c\u1eadp 22\/10\/2026). Livepatch kh\u00f4ng thay \u0111\u01b0\u1ee3c l\u1ea7n reboot \u0111\u1ecbnh k\u1ef3.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_8:_Gi\u1eef_AppArmor_b\u1eadt_v\u00e0_theo_d\u00f5i_thay_\u0111\u1ed5i_b\u1eb1ng_auditd\">B\u01b0\u1edbc 8: Gi\u1eef AppArmor b\u1eadt v\u00e0 theo d\u00f5i thay \u0111\u1ed5i b\u1eb1ng auditd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">AppArmor gi\u1edbi h\u1ea1n file v\u00e0 quy\u1ec1n m\u00e0 t\u1eebng ch\u01b0\u01a1ng tr\u00ecnh \u0111\u01b0\u1ee3c d\u00f9ng, n\u00ean d\u1ecbch v\u1ee5 b\u1ecb khai th\u00e1c kh\u00f3 lan sang ph\u1ea7n c\u00f2n l\u1ea1i c\u1ee7a h\u1ec7 th\u1ed1ng. Ubuntu n\u1ea1p AppArmor m\u1eb7c \u0111\u1ecbnh (<a href=\"https:\/\/ubuntu.com\/server\/docs\/how-to\/security\/apparmor\/\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu Server docs<\/a>). G\u1eb7p l\u1ed7i quy\u1ec1n th\u00ec kh\u00f4ng t\u1eaft AppArmor: chuy\u1ec3n ri\u00eang profile \u0111\u00f3 sang complain, \u0111\u1ecdc log, s\u1eeda profile r\u1ed3i tr\u1ea3 v\u1ec1 enforce.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Tr\u1ea1ng th\u00e1i: s\u1ed1 profile \u0111ang n\u1ea1p, bao nhi\u00eau \u1edf ch\u1ebf \u0111\u1ed9 enforce\nsudo aa-status\n\n# Th\u00eam b\u1ed9 profile m\u1eabu v\u00e0 c\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd (tu\u1ef3 ch\u1ecdn)\nsudo apt install apparmor-profiles apparmor-utils -y\n\n# T\u1ea1m chuy\u1ec3n m\u1ed9t profile sang complain \u0111\u1ec3 \u0111i\u1ec1u tra l\u1ed7i, xong th\u00ec tr\u1ea3 v\u1ec1 enforce\nsudo aa-complain \/usr\/sbin\/TEN_CHUONG_TRINH\nsudo aa-enforce \/usr\/sbin\/TEN_CHUONG_TRINH<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">auditd ghi l\u1ea1i ai s\u1eeda file quan tr\u1ecdng v\u00e0 l\u00fac n\u00e0o. Quy t\u1eafc <code>-w<\/code> theo d\u00f5i m\u1ed9t file, <code>-p wa<\/code> ghi khi c\u00f3 thay \u0111\u1ed5i n\u1ed9i dung ho\u1eb7c thu\u1ed9c t\u00ednh, <code>-k<\/code> g\u1eafn nh\u00e3n \u0111\u1ec3 t\u00ecm (<a href=\"https:\/\/manpages.ubuntu.com\/manpages\/noble\/man8\/auditctl.8.html\" rel=\"nofollow noopener\" target=\"_blank\">man auditctl<\/a>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install auditd -y\n\nsudo tee \/etc\/audit\/rules.d\/90-bao-mat.rules &gt; \/dev\/null &lt;&lt;'EOF'\n-w \/etc\/passwd -p wa -k taikhoan\n-w \/etc\/shadow -p wa -k taikhoan\n-w \/etc\/sudoers -p wa -k sudo\n-w \/etc\/sudoers.d\/ -p wa -k sudo\n-w \/etc\/ssh\/sshd_config -p wa -k ssh\n-w \/etc\/ssh\/sshd_config.d\/ -p wa -k ssh\nEOF\n\nsudo augenrules --load\nsudo auditctl -l\n\n# T\u00ecm c\u00e1c thay \u0111\u1ed5i theo nh\u00e3n, ho\u1eb7c xem b\u00e1o c\u00e1o t\u1ed5ng h\u1ee3p\nsudo ausearch -k ssh -i | tail -20\nsudo aureport --summary<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ki\u1ec3m tra h\u1eb1ng ng\u00e0y, \u0111\u1ecdc log b\u1eb1ng journal l\u00e0 \u0111\u1ee7:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u0110\u0103ng nh\u1eadp SSH th\u00e0nh c\u00f4ng trong 24 gi\u1edd qua\nsudo journalctl -u ssh --since \"24 hours ago\" | grep \"Accepted\"\n\n# L\u1ec7nh sudo \u0111\u00e3 ch\u1ea1y h\u00f4m nay\nsudo journalctl _COMM=sudo --since today<\/code><\/pre>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_9:_Ki\u1ec3m_tra_c\u1ed5ng_\u0111ang_m\u1edf_v\u00e0_d\u1ecbch_v\u1ee5_\u0111ang_l\u1eafng_nghe\">B\u01b0\u1edbc 9: Ki\u1ec3m tra c\u1ed5ng \u0111ang m\u1edf v\u00e0 d\u1ecbch v\u1ee5 \u0111ang l\u1eafng nghe<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1ed7i d\u1ecbch v\u1ee5 l\u1eafng nghe tr\u00ean \u0111\u1ecba ch\u1ec9 c\u00f4ng khai l\u00e0 m\u1ed9t \u0111\u01b0\u1eddng v\u00e0o VPS. Ki\u1ec3m tra trong VPS \u0111\u1ec3 bi\u1ebft d\u1ecbch v\u1ee5 n\u00e0o \u0111ang m\u1edf, r\u1ed3i t\u1eeb m\u00e1y ngo\u00e0i \u0111\u1ec3 bi\u1ebft t\u01b0\u1eddng l\u1eeda th\u1ef1c s\u1ef1 ch\u1eb7n g\u00ec. Database, Redis v\u00e0 trang qu\u1ea3n tr\u1ecb ch\u1ec9 n\u00ean nghe tr\u00ean 127.0.0.1.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Trong VPS: c\u1ed9t Local Address 0.0.0.0 ho\u1eb7c [::] ngh\u0129a l\u00e0 m\u1edf cho m\u1ecdi m\u1ea1ng\nsudo ss -tulpn\n\n# T\u1eeb m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n (ch\u1ec9 qu\u00e9t VPS c\u1ee7a ch\u00ednh b\u1ea1n): xem c\u1ed5ng n\u00e0o th\u1ef1c s\u1ef1 truy c\u1eadp \u0111\u01b0\u1ee3c\nnmap -Pn IP_VPS\n\n# V\u00ed d\u1ee5 MySQL\/MariaDB: ki\u1ec3m tra \u0111\u1ecba ch\u1ec9 l\u1eafng nghe\nsudo ss -tlnp | grep 3306        # n\u00ean l\u00e0 127.0.0.1:3306\n\n# C\u1ea7n v\u00e0o database t\u1eeb xa th\u00ec d\u00f9ng \u0111\u01b0\u1eddng h\u1ea7m SSH thay v\u00ec m\u1edf c\u1ed5ng\nssh -L 3307:127.0.0.1:3306 tenban@IP_VPS<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1eaft d\u1ecbch v\u1ee5 kh\u00f4ng d\u00f9ng b\u1eb1ng <code>sudo systemctl disable --now TEN_DICH_VU<\/code>. C\u00e0i ch\u1ee9ng ch\u1ec9 cho c\u1ed5ng 443: xem <a href=\"https:\/\/tino.vn\/blog\/cai-ssl-tren-vps\/\">c\u00e0i SSL tr\u00ean VPS<\/a>. B\u1ea3o m\u1eadt kh\u00f4ng thay \u0111\u01b0\u1ee3c sao l\u01b0u ra ngo\u00e0i VPS: xem <a href=\"https:\/\/tino.vn\/blog\/backup-vps\/\">backup VPS<\/a>.<\/p>\n\n\n\n<h2 id=\"C\u00f3_n\u00ean_\u0111\u1ed5i_c\u1ed5ng_SSH_tr\u00ean_Ubuntu_24.04_kh\u00f4ng?\">C\u00f3 n\u00ean \u0111\u1ed5i c\u1ed5ng SSH tr\u00ean Ubuntu 24.04 kh\u00f4ng?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed5i c\u1ed5ng SSH kh\u1ecfi 22 gi\u1ea3m l\u01b0\u1ee3ng bot d\u00f2 t\u1ef1 \u0111\u1ed9ng v\u00e0 l\u00e0m log g\u1ecdn h\u01a1n, nh\u01b0ng kh\u00f4ng thay \u0111\u01b0\u1ee3c SSH key, UFW hay Fail2ban; gi\u1edbi h\u1ea1n IP c\u00f3 t\u00e1c d\u1ee5ng l\u1edbn h\u01a1n. Ubuntu 24.04 ch\u1ea1y SSH qua <code>ssh.socket<\/code>, n\u00ean ph\u1ea3i n\u1ea1p l\u1ea1i systemd sau khi \u0111\u1ed5i c\u1ed5ng (<a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/openssh\/+bug\/2069041\" rel=\"nofollow noopener\" target=\"_blank\">Ubuntu bug #2069041<\/a>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># 1. M\u1edf c\u1ed5ng m\u1edbi tr\u00ean UFW TR\u01af\u1edaC\nsudo ufw limit 2222\/tcp\n# 1b. D\u1eeaNG L\u1ea0I: n\u1ebfu VPS c\u00f3 t\u01b0\u1eddng l\u1eeda \u1edf trang qu\u1ea3n tr\u1ecb c\u1ee7a nh\u00e0 cung c\u1ea5p, m\u1edf c\u1ed5ng 2222\/tcp \u1edf \u0111\u00f3 NGAY B\u00c2Y GI\u1edc\n\n# 2. Khai b\u00e1o c\u1ed5ng m\u1edbi\necho 'Port 2222' | sudo tee \/etc\/ssh\/sshd_config.d\/02-port.conf\nsudo sshd -t\n\n# 3. Ch\u1ec9 restart khi c\u1ea3 UFW v\u00e0 t\u01b0\u1eddng l\u1eeda nh\u00e0 cung c\u1ea5p \u0111\u00e3 m\u1edf c\u1ed5ng m\u1edbi\nsudo systemctl daemon-reload\nsudo systemctl restart ssh.socket\n\n# 4. Th\u1eed \u1edf c\u1eeda s\u1ed5 m\u1edbi: ssh -p 2222 tenban@IP_VPS\n# 5. Th\u00e0nh c\u00f4ng r\u1ed3i m\u1edbi \u0111\u00f3ng c\u1ed5ng c\u0169, v\u00e0 s\u1eeda port trong jail [sshd] c\u1ee7a Fail2ban\nsudo ufw delete limit OpenSSH<\/code><\/pre>\n\n\n\n<h2 id=\"Ki\u1ec3m_tra_l\u1ea1i_to\u00e0n_b\u1ed9_c\u1ea5u_h\u00ecnh_b\u1ea3o_m\u1eadt_VPS_Ubuntu\">Ki\u1ec3m tra l\u1ea1i to\u00e0n b\u1ed9 c\u1ea5u h\u00ecnh b\u1ea3o m\u1eadt VPS Ubuntu<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sau 9 b\u01b0\u1edbc, ch\u1ea1y l\u1ea1i l\u1ec7nh ki\u1ec3m tra c\u1ee7a t\u1eebng b\u01b0\u1edbc v\u00e0 so v\u1edbi k\u1ebft qu\u1ea3 mong \u0111\u1ee3i d\u01b0\u1edbi \u0111\u00e2y. D\u00f9ng b\u1ea3ng n\u00e0y \u0111\u1ec3 r\u00e0 h\u1eb1ng th\u00e1ng ho\u1eb7c sau khi ng\u01b0\u1eddi kh\u00e1c can thi\u1ec7p v\u00e0o VPS.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>H\u1ea1ng m\u1ee5c (b\u01b0\u1edbc)<\/th><th>K\u1ebft qu\u1ea3 mong \u0111\u1ee3i<\/th><\/tr><\/thead><tbody><tr><td>Phi\u00ean b\u1ea3n, b\u1ea3n v\u00e1 (1)<\/td><td>24.04 LTS ho\u1eb7c b\u1ea3n LTS m\u1edbi h\u01a1n c\u00f2n h\u1ed7 tr\u1ee3; kh\u00f4ng c\u00f2n g\u00f3i b\u1ea3o m\u1eadt ch\u1edd c\u00e0i, kh\u00f4ng c\u00f3 <code>\/var\/run\/reboot-required<\/code><\/td><\/tr><tr><td>\u0110\u0103ng nh\u1eadp SSH (4)<\/td><td><code>sshd -T<\/code> tr\u1ea3 v\u1ec1 <code>passwordauthentication no<\/code>, <code>permitrootlogin no<\/code><\/td><\/tr><tr><td>T\u01b0\u1eddng l\u1eeda (5)<\/td><td><code>Status: active<\/code>, m\u1eb7c \u0111\u1ecbnh deny incoming, ch\u1ec9 m\u1edf SSH v\u00e0 c\u1ed5ng web<\/td><\/tr><tr><td>Fail2ban (6)<\/td><td>Jail <code>sshd<\/code> v\u00e0 <code>recidive<\/code> \u0111ang ch\u1ea1y; <code>fail2ban-client status recidive<\/code> c\u00f3 d\u00f2ng File list ch\u1ee9a <code>\/var\/log\/fail2ban.log<\/code><\/td><\/tr><tr><td>C\u1eadp nh\u1eadt t\u1ef1 \u0111\u1ed9ng (7)<\/td><td>Hai d\u00f2ng trong <code>20auto-upgrades<\/code> c\u00f3 gi\u00e1 tr\u1ecb <code>\"1\"<\/code><\/td><\/tr><tr><td>AppArmor, auditd (8)<\/td><td>C\u00f3 profile \u1edf ch\u1ebf \u0111\u1ed9 enforce; <code>auditctl -l<\/code> th\u1ea5y c\u00e1c quy t\u1eafc <code>-w<\/code> \u0111\u00e3 th\u00eam<\/td><\/tr><tr><td>C\u1ed5ng m\u1edf (9)<\/td><td>Database, Redis ch\u1ec9 nghe 127.0.0.1<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">L\u1ec7nh v\u00e0 gi\u00e1 tr\u1ecb mong \u0111\u1ee3i theo Ubuntu Server docs, man OpenSSH, ufw, auditctl (truy c\u1eadp 21\/10\/2026).<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n r\u00e0 t\u1ef1 \u0111\u1ed9ng th\u00eam m\u1ed9t l\u01b0\u1ee3t, c\u00f4ng c\u1ee5 m\u00e3 ngu\u1ed3n m\u1edf <a href=\"https:\/\/cisofy.com\/lynis\/\" rel=\"nofollow noopener\" target=\"_blank\">Lynis<\/a> qu\u00e9t c\u1ea5u h\u00ecnh v\u00e0 li\u1ec7t k\u00ea c\u1ea3nh b\u00e1o k\u00e8m g\u1ee3i \u00fd: <code>sudo apt install lynis<\/code> r\u1ed3i <code>sudo lynis audit system<\/code>. B\u1ea3n trong kho Ubuntu c\u00f3 th\u1ec3 c\u0169 h\u01a1n b\u1ea3n tr\u00ean trang d\u1ef1 \u00e1n; coi k\u1ebft qu\u1ea3 l\u00e0 danh s\u00e1ch \u0111\u1ec3 xem x\u00e9t, kh\u00f4ng ph\u1ea3i \u0111i\u1ec3m s\u1ed1 ph\u1ea3i \u0111\u1ea1t.<\/p>\n\n\n\n<h2 id=\"B\u1ecb_kho\u00e1_kh\u1ecfi_VPS_sau_khi_b\u1ea3o_m\u1eadt_th\u00ec_l\u00e0m_sao?\">B\u1ecb kho\u00e1 kh\u1ecfi VPS sau khi b\u1ea3o m\u1eadt th\u00ec l\u00e0m sao?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Khi kh\u00f4ng SSH \u0111\u01b0\u1ee3c sau khi \u0111\u1ed5i c\u1ea5u h\u00ecnh, h\u00e3y v\u00e0o VPS qua console tr\u00ean trang qu\u1ea3n tr\u1ecb c\u1ee7a nh\u00e0 cung c\u1ea5p, v\u00ec console kh\u00f4ng \u0111i qua SSH hay UFW. T\u1eeb console, ki\u1ec3m tra l\u1ea7n l\u01b0\u1ee3t t\u01b0\u1eddng l\u1eeda, c\u1ea5u h\u00ecnh SSH v\u00e0 Fail2ban.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-diem-tu-khoa.webp\" alt=\"B\u1ed1n \u0111i\u1ec3m d\u1ec5 m\u1ea5t SSH khi b\u1ea3o m\u1eadt VPS Ubuntu v\u00e0 k\u1ebft qu\u1ea3 ph\u1ea3i th\u1ea5y: b\u01b0\u1edbc 3 th\u00eam SSH key, th\u1eed \u1edf c\u1eeda s\u1ed5 m\u1edbi, ssh tenban@IP v\u00e0o \u0111\u01b0\u1ee3c b\u1eb1ng key v\u00e0 sudo whoami ra root, nguy hi\u1ec3m n\u1ebfu t\u1eaft m\u1eadt kh\u1ea9u khi key ch\u01b0a ch\u1ea1y; b\u01b0\u1edbc 4 t\u1eaft m\u1eadt kh\u1ea9u v\u00e0 root b\u1eb1ng 01-bao-mat.conf \u0111\u1ecdc tr\u01b0\u1edbc 50-cloud-init.conf, sshd -t kh\u00f4ng in g\u00ec, sshd -T c\u00f3 passwordauthentication no, sai c\u00fa ph\u00e1p m\u00e0 v\u1eabn restart g\u00e2y Connection refused; b\u01b0\u1edbc 5 ufw limit OpenSSH tr\u01b0\u1edbc, ufw enable sau c\u00f9ng, ufw status c\u00f3 Status active, OpenSSH LIMIT, 80 v\u00e0 443 ALLOW, enable tr\u01b0\u1edbc khi m\u1edf SSH g\u00e2y Connection timed out; \u0111\u1ed5i c\u1ed5ng SSH: m\u1edf 2222 \u1edf UFW v\u00e0 t\u01b0\u1eddng l\u1eeda nh\u00e0 cung c\u1ea5p r\u1ed3i m\u1edbi restart, ssh -p 2222 v\u00e0o \u0111\u01b0\u1ee3c m\u1edbi xo\u00e1 quy t\u1eafc c\u1ed5ng 22; b\u1ecb kho\u00e1 th\u00ec v\u00e0o console c\u1ee7a nh\u00e0 cung c\u1ea5p\" class=\"wp-image-131322\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-diem-tu-khoa.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-diem-tu-khoa-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-diem-tu-khoa-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/bao-mat-vps-ubuntu-diem-tu-khoa-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Tri\u1ec7u ch\u1ee9ng<\/th><th>Nguy\u00ean nh\u00e2n th\u01b0\u1eddng g\u1eb7p<\/th><th>C\u00e1ch s\u1eeda t\u1eeb console<\/th><\/tr><\/thead><tbody><tr><td><code>Connection timed out<\/code><\/td><td>UFW ch\u1eb7n c\u1ed5ng SSH, ho\u1eb7c \u0111\u1ed5i c\u1ed5ng m\u00e0 ch\u01b0a m\u1edf<\/td><td><code>sudo ufw allow OpenSSH<\/code> ho\u1eb7c m\u1edf \u0111\u00fang c\u1ed5ng \u0111ang d\u00f9ng<\/td><\/tr><tr><td><code>Permission denied (publickey)<\/code><\/td><td>Key ch\u01b0a n\u1eb1m trong <code>authorized_keys<\/code>, sai quy\u1ec1n file, user kh\u00f4ng c\u00f3 trong <code>AllowUsers<\/code><\/td><td><code>chmod 700 ~\/.ssh; chmod 600 ~\/.ssh\/authorized_keys<\/code>; ki\u1ec3m tra file <code>01-bao-mat.conf<\/code><\/td><\/tr><tr><td><code>Connection refused<\/code><\/td><td>D\u1ecbch v\u1ee5 SSH kh\u00f4ng ch\u1ea1y ho\u1eb7c c\u1ea5u h\u00ecnh sai c\u00fa ph\u00e1p<\/td><td><code>sudo sshd -t<\/code>, s\u1eeda l\u1ed7i r\u1ed3i <code>sudo systemctl restart ssh.service<\/code><\/td><\/tr><tr><td>L\u00fac v\u00e0o \u0111\u01b0\u1ee3c, l\u00fac kh\u00f4ng<\/td><td>Fail2ban ch\u1eb7n IP c\u1ee7a b\u1ea1n sau v\u00e0i l\u1ea7n nh\u1eadp sai<\/td><td><code>sudo fail2ban-client set sshd unbanip IP<\/code>, th\u00eam IP v\u00e0o <code>ignoreip<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Tr\u00ean <a href=\"https:\/\/tino.vn\/vps-gia-re\">VPS NVMe t\u1ea1i Tino<\/a>, Web Console (noVNC) v\u00e0o \u0111\u01b0\u1ee3c VPS qua tr\u00ecnh duy\u1ec7t ngay c\u1ea3 khi b\u1ecb ch\u1eb7n truy c\u1eadp, theo trang s\u1ea3n ph\u1ea9m (ki\u1ec3m tra 21\/10\/2026). M\u1ea5t kho\u00e1 ri\u00eang th\u00ec d\u00f9ng console \u0111\u1ec3 th\u00eam key m\u1edbi.<\/p>\n\n\n\n<h2 id=\"Khi_n\u00e0o_kh\u00f4ng_c\u1ea7n_l\u00e0m_h\u1ebft_c\u00e1c_b\u01b0\u1edbc_tr\u00ean?\">Khi n\u00e0o kh\u00f4ng c\u1ea7n l\u00e0m h\u1ebft c\u00e1c b\u01b0\u1edbc tr\u00ean?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Kh\u00f4ng ph\u1ea3i VPS n\u00e0o c\u0169ng c\u1ea7n \u0111\u1ee7 9 b\u01b0\u1edbc ngay ng\u00e0y \u0111\u1ea7u. B\u1ea3y b\u01b0\u1edbc \u0111\u1ea7u n\u00ean l\u00e0m v\u1edbi m\u1ecdi VPS c\u00f3 IP c\u00f4ng khai, v\u00ec bot qu\u00e9t kh\u00f4ng ph\u00e2n bi\u1ec7t m\u00e1y l\u1edbn hay nh\u1ecf; auditd v\u00e0 tinh ch\u1ec9nh AppArmor c\u00f3 th\u1ec3 \u0111\u1ec3 sau.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>VPS th\u1eed nghi\u1ec7m, xo\u00e1 sau v\u00e0i ng\u00e0y:<\/strong> l\u00e0m t\u1edbi b\u01b0\u1edbc 5, kh\u00f4ng l\u01b0u d\u1eef li\u1ec7u th\u1eadt.<\/li>\n\n\n<li><strong>D\u00f9ng control panel ho\u1eb7c <a href=\"https:\/\/tino.vn\/blog\/script-vps-tot-nhat\/\">script VPS<\/a>:<\/strong> nhi\u1ec1u c\u00f4ng c\u1ee5 t\u1ef1 c\u1ea5u h\u00ecnh t\u01b0\u1eddng l\u1eeda v\u00e0 Fail2ban; ki\u1ec3m tra b\u1eb1ng b\u1ea3ng \u1edf tr\u00ean thay v\u00ec c\u00e0i \u0111\u00e8.<\/li>\n\n\n<li><strong>Ch\u01b0a quen d\u00f2ng l\u1ec7nh, kh\u00f4ng c\u00f3 ng\u01b0\u1eddi tr\u1ef1c VPS:<\/strong> c\u00e2n nh\u1eafc <a href=\"https:\/\/tino.vn\/blog\/nen-lua-chon-shared-hosting-hay-vps-hosting\/\">shared hosting thay v\u00ec VPS<\/a>. VPS b\u1ecb t\u1ea5n c\u00f4ng l\u00e0m ngh\u1ebdn m\u1ea1ng: xem <a href=\"https:\/\/tino.vn\/blog\/cach-chong-ddos-cho-vps\/\">c\u00e1ch ch\u1ed1ng DDoS cho VPS<\/a>.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/tino.vn\/vps-gia-re\">Xem c\u00e1c g\u00f3i VPS NVMe t\u1ea1i Tino<\/a><\/div>\n<\/div>\n\n\n\n<h2 id=\"C\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p_v\u1ec1_b\u1ea3o_m\u1eadt_VPS_Ubuntu\">C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 b\u1ea3o m\u1eadt VPS Ubuntu<\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"N\u00ean_ch\u1ecdn_Ubuntu_22.04,_24.04_hay_26.04_cho_VPS?\">N\u00ean ch\u1ecdn Ubuntu 22.04, 24.04 hay 26.04 cho VPS?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">V\u1edbi VPS c\u00e0i m\u1edbi, ch\u1ecdn b\u1ea3n LTS c\u00f2n th\u1eddi gian h\u1ed7 tr\u1ee3 d\u00e0i v\u00e0 \u0111\u01b0\u1ee3c ph\u1ea7n m\u1ec1m b\u1ea1n \u0111\u1ecbnh d\u00f9ng h\u1ed7 tr\u1ee3. Theo Canonical, 22.04 h\u1ebft h\u1ed7 tr\u1ee3 ti\u00eau chu\u1ea9n 05\/2027, 24.04 v\u00e0o 05\/2029 v\u00e0 26.04 v\u00e0o 05\/2031. M\u1ed9t s\u1ed1 control panel v\u00e0 script ch\u01b0a h\u1ed7 tr\u1ee3 26.04, n\u00ean ki\u1ec3m tra tr\u01b0\u1edbc khi c\u00e0i.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Nh\u00e0_cung_c\u1ea5p_\u0111\u00e3_c\u00f3_t\u01b0\u1eddng_l\u1eeda_m\u1ea1ng,_t\u00f4i_c\u00f2n_c\u1ea7n_UFW_kh\u00f4ng?\">Nh\u00e0 cung c\u1ea5p \u0111\u00e3 c\u00f3 t\u01b0\u1eddng l\u1eeda m\u1ea1ng, t\u00f4i c\u00f2n c\u1ea7n UFW kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">N\u00ean c\u00f3 c\u1ea3 hai. T\u01b0\u1eddng l\u1eeda m\u1ea1ng c\u1ee7a nh\u00e0 cung c\u1ea5p ch\u1eb7n l\u01b0u l\u01b0\u1ee3ng tr\u01b0\u1edbc khi t\u1edbi VPS v\u00e0 kh\u00f4ng t\u1ed1n t\u00e0i nguy\u00ean m\u00e1y. UFW ki\u1ec3m so\u00e1t ngay tr\u00ean VPS, v\u1eabn ho\u1ea1t \u0111\u1ed9ng khi b\u1ea1n chuy\u1ec3n nh\u00e0 cung c\u1ea5p v\u00e0 ch\u1eb7n c\u1ea3 c\u1ed5ng do ph\u1ea7n m\u1ec1m m\u1edbi c\u00e0i t\u1ef1 m\u1edf. Khi \u0111\u1ed5i c\u1ed5ng, nh\u1edb m\u1edf c\u00f9ng m\u1ed9t c\u1ed5ng \u1edf c\u1ea3 hai n\u01a1i.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_sao_bi\u1ebft_VPS_Ubuntu_\u0111\u00e3_b\u1ecb_x\u00e2m_nh\u1eadp?\">L\u00e0m sao bi\u1ebft VPS Ubuntu \u0111\u00e3 b\u1ecb x\u00e2m nh\u1eadp?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">D\u1ea5u hi\u1ec7u th\u01b0\u1eddng g\u1eb7p l\u00e0 CPU cao do ti\u1ebfn tr\u00ecnh l\u1ea1, \u0111\u0103ng nh\u1eadp th\u00e0nh c\u00f4ng t\u1eeb IP kh\u00f4ng quen, SSH key ho\u1eb7c user l\u1ea1, cron l\u1ea1 v\u00e0 l\u01b0u l\u01b0\u1ee3ng g\u1eedi ra t\u0103ng v\u1ecdt. Xem <a href=\"https:\/\/tino.vn\/blog\/bao-mat-vps\/\">quy tr\u00ecnh x\u1eed l\u00fd VPS b\u1ecb x\u00e2m nh\u1eadp<\/a> trong b\u00e0i t\u1ed5ng qu\u00e1t.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"N\u00ean ch\u1ecdn Ubuntu 22.04, 24.04 hay 26.04 cho VPS?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>V\u1edbi VPS c\u00e0i m\u1edbi, ch\u1ecdn b\u1ea3n LTS c\u00f2n th\u1eddi gian h\u1ed7 tr\u1ee3 d\u00e0i v\u00e0 \u0111\u01b0\u1ee3c ph\u1ea7n m\u1ec1m b\u1ea1n \u0111\u1ecbnh d\u00f9ng h\u1ed7 tr\u1ee3. Theo Canonical, 22.04 h\u1ebft h\u1ed7 tr\u1ee3 ti\u00eau chu\u1ea9n 05\/2027, 24.04 v\u00e0o 05\/2029 v\u00e0 26.04 v\u00e0o 05\/2031. M\u1ed9t s\u1ed1 control panel v\u00e0 script ch\u01b0a h\u1ed7 tr\u1ee3 26.04, n\u00ean ki\u1ec3m tra tr\u01b0\u1edbc khi c\u00e0i.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Nh\u00e0 cung c\u1ea5p \u0111\u00e3 c\u00f3 t\u01b0\u1eddng l\u1eeda m\u1ea1ng, t\u00f4i c\u00f2n c\u1ea7n UFW kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>N\u00ean c\u00f3 c\u1ea3 hai. T\u01b0\u1eddng l\u1eeda m\u1ea1ng c\u1ee7a nh\u00e0 cung c\u1ea5p ch\u1eb7n l\u01b0u l\u01b0\u1ee3ng tr\u01b0\u1edbc khi t\u1edbi VPS v\u00e0 kh\u00f4ng t\u1ed1n t\u00e0i nguy\u00ean m\u00e1y. UFW ki\u1ec3m so\u00e1t ngay tr\u00ean VPS, v\u1eabn ho\u1ea1t \u0111\u1ed9ng khi b\u1ea1n chuy\u1ec3n nh\u00e0 cung c\u1ea5p v\u00e0 ch\u1eb7n c\u1ea3 c\u1ed5ng do ph\u1ea7n m\u1ec1m m\u1edbi c\u00e0i t\u1ef1 m\u1edf. Khi \u0111\u1ed5i c\u1ed5ng, nh\u1edb m\u1edf c\u00f9ng m\u1ed9t c\u1ed5ng \u1edf c\u1ea3 hai n\u01a1i.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m sao bi\u1ebft VPS Ubuntu \u0111\u00e3 b\u1ecb x\u00e2m nh\u1eadp?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>D\u1ea5u hi\u1ec7u th\u01b0\u1eddng g\u1eb7p l\u00e0 CPU cao do ti\u1ebfn tr\u00ecnh l\u1ea1, \u0111\u0103ng nh\u1eadp th\u00e0nh c\u00f4ng t\u1eeb IP kh\u00f4ng quen, SSH key ho\u1eb7c user l\u1ea1, cron l\u1ea1 v\u00e0 l\u01b0u l\u01b0\u1ee3ng g\u1eedi ra t\u0103ng v\u1ecdt. Xem <a>quy tr\u00ecnh x\u1eed l\u00fd VPS b\u1ecb x\u00e2m nh\u1eadp<\/a> trong b\u00e0i t\u1ed5ng qu\u00e1t.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>B\u1ea3o m\u1eadt VPS Ubuntu l\u00e0 \u0111\u00f3ng c\u00e1c \u0111\u01b0\u1eddng v\u00e0o kh\u00f4ng c\u1ea7n thi\u1ebft v\u00e0 ghi l\u1ea1i m\u1ecdi thay \u0111\u1ed5i quan tr\u1ecdng tr\u00ean m\u00e1y ch\u1ee7. Tr\u00ean Ubuntu 24.04 LTS, th\u1ee9 t\u1ef1 an to\u00e0n l\u00e0: c\u1eadp nh\u1eadt h\u1ec7 th\u1ed1ng, t\u1ea1o user sudo, \u0111\u0103ng nh\u1eadp b\u1eb1ng SSH key ed25519, t\u1eaft m\u1eadt kh\u1ea9u v\u00e0 root qua SSH. Sau \u0111\u00f3 b\u1eadt [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":131241,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7721],"tags":[7436],"class_list":["post-120368","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bao-mat-ssl","tag-bao-mat-vps"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/120368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=120368"}],"version-history":[{"count":7,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/120368\/revisions"}],"predecessor-version":[{"id":131383,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/120368\/revisions\/131383"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/131241"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=120368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=120368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=120368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}