Linux security level configuration for database applications

Source: Internet
Author: User

? Function of shielding Ctrl+alt+delete key shutdown

#vi/etc/inittab

Change "Ca::ctrlaltdel:/sbin/shutdown-r-T 4 Now" to: "Ca::ctrlaltdel:/bin/true", and then execute "init Q" to make the update effective.

? Session Timeout limit

Edit/etc/profile File:

Readonlytmout=90;export Tmout

The session of the remote character Terminal window after setting is automatically disconnected after 90 seconds

? disabling USB storage

# ls/lib/modules/$ (uname-r)/kernel/drivers/usb/storage/usb-storage.ko

# mv/lib/modules/$ (uname-r)/kernel/drivers/usb/storage/usb-storage.ko/tmp

? Number of open files limit

Edit/etc/security/limits.conf file, add two lines

* Hard nofile8192

* Soft nofile10240

? Limit root users to login directly via SSH protocol

#vi/etc/ssh/sshd_config

Add Permitrootlogin no row

#rcsshdrestart//Reboot SSH service

? IP Access Control

Only allow specific IP addresses to access the server through the SSH protocol.

#vi/etc/hosts.deny

Sshd:allexcept IP Address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.