मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी48k · #5071

linux-hardening

यह क्या करती है

यह एजेंट कुछ जाने-माने सुरक्षा सुझावों का पालन करके Linux सर्वर को और सुरक्षित बनाने में मदद करता है। यह सेटिंग्स इस तरह बदलता है कि अनधिकृत पहुँच और कमज़ोरियों से बचाव हो।

कब इस्तेमाल करें

  • ✓नया प्रोडक्शन सर्वर सेट करते समय।
  • ✓जब किसी खास सुरक्षा नियम को पूरा करना हो।
  • ✓मौजूदा सर्वर की सुरक्षा मज़बूत करने के लिए।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/linux-hardening/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/linux-hardening/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस Linux सर्वर को सुरक्षा की अच्छी प्रथाओं (security best practices) का पालन करके और सुरक्षित बनाओ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह सुझाई गई सुरक्षा सेटिंग्स लागू करता है, जैसे SSH एक्सेस को सीमित करना, मज़बूत पासवर्ड नियम बनाना और firewall सेट करना। यह बेहतर सुरक्षा के लिए operating system के पैरामीटर भी एडजस्ट करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Linux Hardening

Secure Linux servers following CIS benchmarks and security best practices.

When to Use This Skill

Use this skill when:

  • Hardening production servers
  • Meeting compliance requirements
  • Implementing security baselines
  • Configuring secure SSH access

Target and recovery

Confirm distribution/version, selected CIS profile, current service config and user-authorized changes. Keep a known-working access session and out-of-band recovery, back up affected files privately, preview changes and validate before reload. These examples are fragments, not a universal CIS-compliance script. Do not apply firewall/default-deny rules before verifying management access and IPv4/IPv6 requirements.

SSH Hardening

# Example sshd configuration; merge with existing policy
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
AllowUsers <confirmed-management-users>

User Security

# Password policy
sudo apt install libpam-pwquality
# /etc/security/pwquality.conf
minlen = 14
dcredit = -1
ucredit = -1
ocredit = -1
lcredit = -1

# Set the default for FUTURE accounts: inactivity after password expiry,
# not 30 days since last login; review service-account consequences first.
useradd -D -f 30

# Audit sudo usage
# Edit a reviewed /etc/sudoers.d/ fragment with visudo and validate with visudo -c.
# Do not append blindly to /etc/sudoers.

Firewall Configuration

# UFW setup
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 443/tcp
ufw enable

# Alternative iptables changes require an isolated validated ruleset,
# management allow rules, conntrack, DNS/IPv6 decisions and timed rollback.
# Do not set INPUT DROP first on a live remote host.

Kernel Hardening

# /etc/sysctl.d/99-security.conf
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
kernel.randomize_va_space = 2
fs.suid_dumpable = 0

# After reviewing a supported value set, apply the exact file separately:
# sudo sysctl -p /etc/sysctl.d/99-security.conf

File Permissions

# Inspect distro-prescribed owner/group/mode before any authorized repair.
# /etc/shadow group readability may be required; do not blanket chmod it.
# Find world-writable files
find / -xdev -type f -perm -0002 -ls

# Find SUID files
find / -xdev -perm -4000 -type f -ls

Audit Configuration

Package installation and audit rules are separate steps. Validate and load the actual rules file through the installed audit tooling; execve auditing can capture secret command arguments and large volumes, so scope access and retention.

# Install auditd
apt install auditd

# /etc/audit/rules.d/audit.rules
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k actions
-a always,exit -F arch=b64 -S execve -k exec

Best Practices

  • Disable unused services
  • Keep system updated
  • Use fail2ban for intrusion prevention
  • Enable SELinux/AppArmor
  • Regular security audits
  • Monitor log files
  • Implement least privilege

Related Skills

  • cis-benchmarks (cis-benchmarks) - Compliance scanning
  • firewall-config (firewall-config) - Firewall rules

Limitations

  • Apply guidance only within authorized scope; test destructive steps in non-production first.
  • Docs-only import: upstream scripts and templates not bundled.

Example

# Read-only first: inventory before any active step.
which <tool> && <tool> --help | head -n 20

Adapted from BagelHole/DevOps-Security-Agent-Skills (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.

अक्सर पूछे जाने वाले सवाल

'CIS benchmarks' क्या होते हैं?

ये विशेषज्ञों द्वारा बनाए गए सुरक्षा सुझावों और अच्छी प्रथाओं का एक सेट है, जिससे सिस्टम को सुरक्षित तरीके से कॉन्फ़िगर किया जा सके।

क्या यह एजेंट मेरा डेटा डिलीट कर देगा?

नहीं, लेकिन महत्वपूर्ण सर्वर पर लागू करने से पहले बैकअप लेना और सुरक्षित वातावरण में टेस्ट करना ज़रूरी है, क्योंकि यह सिस्टम सेटिंग्स बदलता है।

क्या इसे उपयोग करने के लिए कोडिंग आनी चाहिए?

नहीं। बस आपको एजेंट से अपने Linux सर्वर पर सुरक्षा सुधार लागू करने को कहना होगा।

जानकारी

लेखक का मूल विवरण

Apply CIS benchmarks and secure Linux servers.

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#5071
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills