
VPS hardening — पहले घंटे की OPSEC checklist.
आठ चरण. हर fresh server पर यह चलाएँ.
किसी भी workload के fresh VPS पर जाने से पहले सार्वभौमिक pre-launch checklist. SSH key-only, custom port, firewall, auto-updates, fail2ban, snapshot, documented recovery. Debian 12 / Ubuntu 22-24 / Alpine पर परीक्षित.
- 01
SSH key auth
- 02
Disable root + change port
- 03
Firewall baseline
- 04
Unattended-upgrades
- 05
Fail2ban
- 06
Time + swap
- 07
Baseline snapshot
- 08
Recovery doc
Keys, passwords नहीं. Custom port, 22 नहीं.
अपने laptop पर, एक ed25519 keypair generate करें (smaller, faster, modern):
ssh-keygen -t ed25519 -C "you@laptop"
ssh-copy-id -p 22 root@<vps-ip>
ssh root@<vps-ip> # should now work without password
VPS पर, /etc/ssh/sshd_config edit करें:
Port 54871 # pick a random number 1024-65535
PermitRootLogin no # use a non-root user with sudo
PasswordAuthentication no # keys only
PubkeyAuthentication yes
पहले एक non-root sudo user बनाएँ (adduser bear; usermod -aG sudo bear; ssh-copy-id -p 22 bear@vps), login test करें, फिर sshd restart करें: systemctl restart sshd. यदि आप खुद को lock out करते हैं, तो panel console SSH के बिना shell access देता है.
Default inbound deny करें. जो चाहिए उसे allowlist करें.
apt install -y ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow 54871/tcp # custom SSH port
ufw allow 80/tcp # if running a web service
ufw allow 443/tcp # if running TLS
ufw enable
ufw status verbose
panel के माध्यम से NordBastion bastion-स्तरीय firewall में वही नियम सेट दोहराएं (Networking → Firewall). bastion firewall packet के VPS तक पहुंचने से पहले ब्लॉक कर देता है, volumetric scanning पर CPU बचाता है. गहरी सुरक्षा.
दो packages, पांच मिनट, वास्तविक प्रभाव.
apt install -y unattended-upgrades fail2ban
dpkg-reconfigure -plow unattended-upgrades # accept defaults
systemctl enable --now fail2ban
fail2ban-client status # shows sshd jail
Unattended-upgrades security patches स्वचालित रूप से लागू करता है; fail2ban उन IPs को 1 घंटे के लिए ban करता है जो 10 मिनट के भीतर 5 auth attempts fail करते हैं. baseline use case के लिए किसी को भी आगे config की आवश्यकता नहीं है — दोनों aggressive defaults हैं जो सभी के लिए काम करते हैं.
timezone UTC सेट करें. एक swapfile जोड़ें.
timedatectl set-timezone UTC
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab
free -h # confirm swap is active
सर्वर पर UTC किसी भी timezone में bastions और clients के across log correlation को सरल बनाता है. एक 2-4 GB swapfile OOM-kill spikes से रक्षा करती है; छोटे tiers पर यह मायने रखती है, बड़े tiers पर यह सस्ता बीमा है.
Clean state capture करें. Recovery path लिख लें.
Snapshot. Panel में: Servers → आपका server → Snapshots → Create. इसे baseline-hardened-YYYY-MM-DD नाम दें. NordBastion snapshots off-host, encrypted हैं और seconds लेते हैं. आप लगभग 90 seconds में restore कर सकते हैं — पहली बार जब कोई upgrade sideways जाता है तो आपका future self आपको धन्यवाद देगा.
Recovery दस्तावेज़. कागज़ पर या password manager में, लिखें:
- NordBastion account email + (password mnemonic, password itself नहीं)
- आपकी SSH private key laptop पर कहां रहती है
- custom SSH port नंबर
- VPS पर non-root sudo username
- पुनर्स्थापित करने के लिए baseline snapshot का नाम
- एक नोट: "panel console SSH के बिना काम करता है — lock-out recovery के लिए इसका उपयोग करें"
OPSEC आज चीज़ें लिखने का discipline है ताकि future-you तब recover कर सके जब current-you भूल जाए. Forge tab complete होने पर बंद है.
प्रश्न, उत्तरित।
आठ प्रश्न जो एक first-time VPS customer checklist चलाते समय पूछता है.
क्या SSH key auth वास्तव में एक strong password से सुरक्षित है?
हां, एक बड़े अंतर से. एक password — यहां तक कि एक 16-character random भी — कुछ realistic threat model में brute-forceable है; एक ed25519 SSH key में 256 bits of entropy है और नहीं है. एक key उस device से भी bound है जिस पर यह रहती है, इसलिए एक attacker को key file और उसे decrypt करने वाला passphrase दोनों चाहिए. sshd_config में PasswordAuthentication पूरी तरह disable करें और brute-force attack surface शून्य हो जाती है.
क्या SSH port को 22 से एक random पर बदलना वास्तव में मदद करता है?
यह एक determined attacker को नहीं रोकता — वे सभी 65,535 ports scan करेंगे. यह bots से automated noise की मात्रा ज़रूर कम करता है जो केवल port 22 try करते हैं, जिसका अर्थ है cleaner logs और lower-stress fail2ban. 1024 और 65535 के बीच एक random port चुनें, इसे कहीं ऐसी जगह लिखें जहाँ आप नहीं भूलेंगे, firewall को इसे allow करने के लिए update करें. Net win: लगभग 90 प्रतिशत कम log noise.
UFW या nftables — कौन सा?
सीखने वाले या single VPS चलाने वाले के लिए UFW — यह एक friendly wrapper है, syntax human-readable है, और यह नीचे iptables या nftables के ऊपर बैठता है. nftables directly यदि आप सख्त rule composition, anonymous sets चाहते हैं, या मुट्ठी भर से अधिक servers चलाते हैं और consistency चाहते हैं. दोनों same kernel-level result उत्पन्न करते हैं.
क्या मुझे kernel के लिए भी unattended-upgrades चलाने चाहिए?
Security patches हां — वे critical CVEs को ठीक करते हैं और विकल्प उन्हें खुला छोड़ना है. पूर्ण kernel package upgrades अधिक जोखिम भरे हैं क्योंकि उन्हें प्रभावी होने के लिए reboot चाहिए; unattended-upgrades डिफ़ॉल्ट रूप से आपके लिए reboot नहीं करेगा. /etc/apt/apt.conf.d/50unattended-upgrades पढ़ें और तय करें: अधिकांश NordBastion ग्राहक unattended config को "security-only" पर छोड़ते हैं, और एक शांत window के दौरान मासिक रूप से मैन्युअल reboot करते हैं.
क्या fail2ban ज़रूरी है यदि मैं पहले से password auth disable कर दूँ?
सख्ती से आवश्यक, नहीं — एक बार password auth बंद हो जाने पर, SSH पर brute-force सफल नहीं हो सकती. Fail2ban अन्य services के लिए उपयोगी रहता है (mail, web app login pages, कुछ भी जिसमें credential layer है). सस्ता बीमा: apt install fail2ban, defaults स्वीकार करें, आगे बढ़ें. इसे इंस्टॉल करने में लगने वाले 30 सेकंड cleaner logs और यह जो bonus services-protection प्रदान करता है उसके लायक है.
full disk encryption के बारे में क्या?
पहले घंटे का हिस्सा नहीं — user-held key के साथ full disk encryption के लिए या तो एक custom ISO install की आवश्यकता है (boot पर LUKS mounting एक passphrase के साथ जिसे किसी को type करना होगा) या upcoming NordBastion LUKS-on-provision option (panel roadmap). अभी के लिए, disk को NordBastion द्वारा readable मानें (subpoena की unlikely event में) और NordBastion की jurisdictional protection को उस layer के रूप में मानें जो इसे safe रखती है. यदि आपके threat model को launch से पहले FDE की आवश्यकता है, rescue ISO के माध्यम से Debian को LUKS root volume में install करें और प्रत्येक boot पर panel console के माध्यम से unlock करें — workable लेकिन operational burden में एक meaningful बदलाव.
मुझे कितनी बार snapshots लेनी चाहिए?
तीन उपयोगी cadences. (1) हर meaningful परिवर्तन से पहले (package upgrade, config edit, OS upgrade). (2) एक schedule पर — सप्ताह में एक बार किसी भी production workload के लिए उचित default है. (3) प्रत्येक backup-verification drill से पहले, ताकि आप साबित कर सकें कि restoration काम करती है. NordBastion snapshots off-host और encrypted हैं; वे आपका VPS disk नहीं खाते और लगभग 90 सेकंड में restore हो सकते हैं.
क्या मुझे VPS की निगरानी करनी चाहिए, और कैसे?
पहले घंटे के लिए: अभी नहीं — hardening करें, workload चलाएँ, फिर monitoring जोड़ें एक बार जब आपके पास monitor करने लायक कुछ हो. Lightweight options: एक दूसरे tiny VPS पर node_exporter + Prometheus + Grafana, Netdata एक single-binary self-hosted dashboard के रूप में, या और सरल, एक free-tier external uptime checker (UptimeRobot, BetterStack) जो public ports को ping करता है. एक चुनें, configure करें, और भूल जाएँ — monitoring तब सबसे उपयोगी है जब यह silent रहे.
Server सुरक्षित किया. अब इस पर कुछ बनाएं.
अंतिम review · 2026-05-20 · परीक्षित · Debian 12 · Ubuntu 22.04 / 24.04 · Alpine 3.19+
Anonymous VPS hosting in 2026 — the cluster.
This guide is one spoke of a larger series. The pillar walks the three privacy layers end to end — the sibling spokes below dive into the specifics.
Three independent layers — signup, payment, network — explained, legal context included, common mistakes flagged.
What “no KYC” actually means — and what it does not.
Why Sweden, Finland, Norway and Iceland — the legal floor of each.
XMR end-to-end — wallet, transfer, confirmations, change.
Lightning invoice → paid VPS in under 30 seconds.