在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            Linux安全配置步驟大全

            作者: 時(shí)間:2016-10-08 來(lái)源:網(wǎng)絡(luò) 收藏

            #manager: root ?remove or comment out.

            #dumper: root ?remove or comment out.

            #operator: root ?remove or comment out.

            # trap decode to catch security attacks

            #decode: root

            # Person who should get roots mail

            #root: marc

            最后更新后不要忘記運(yùn)行/usr/bin/newaliases,使改變生效。

            9.阻止你的系統(tǒng)響應(yīng)任何從外部/內(nèi)部來(lái)的ping請(qǐng)求。

            既然沒(méi)有人能ping通你的機(jī)器并收到響應(yīng),你可以大大增強(qiáng)你的站點(diǎn)的安全性。你可以加下面的一行命令到/etc/rc.d/rc.local,以使每次啟動(dòng)后自動(dòng)運(yùn)行。

            echo 1 >; /proc/sys/net/ipv4/icmp_echo_ignore_all

            10. 不要顯示出操作系統(tǒng)和版本信息。

            如果你希望某個(gè)人遠(yuǎn)程登錄到你的服務(wù)器時(shí)不要顯示操作系統(tǒng)和版本信息,你能改變

            /etc/inetd.conf中的一行象下面這樣:

            telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -h

            加-h標(biāo)志在最后使得telnet后臺(tái)不要顯示系統(tǒng)信息,而僅僅顯示login:

            11.The /etc/host.conf file

            編輯host.conf文件(vi /etc/host.conf)且加下面的行:

            # Lookup names via DNS first then fall back to /etc/hosts.

            order bind,hosts

            # We dont have machines with multiple IP addresses on the same card

            (like virtual server,IP Aliasing).

            multi off

            # Check for IP address spoofing.

            nospoof on

            IP Spoofing: IP-Spoofing is a security exploit that works by tricking

            computers in a trust relationship that you are someone that you really arent.

            12. The /etc curetty file

            該文件指定了允許root登錄的tty設(shè)備,/etc curetty被/bin/login程序讀取,它的

            格式是一行一個(gè)被允許的名字列表,如你可以編輯/etc curetty且注釋出下面的行。

            tty1 #tty2 #tty3 #tty4 #tty5 #tty6 #tty7 #tty8

            意味著root僅僅被允許在tty1終端登錄。

            13. 特別的帳號(hào)

            禁止所有默認(rèn)的被操作系統(tǒng)本身啟動(dòng)的且不需要的帳號(hào),當(dāng)你第一次裝上系統(tǒng)時(shí)就應(yīng)該做此檢查,Linux提供了各種帳號(hào),你可能不需要,如果你不需要這個(gè)帳號(hào),就移走它,你有的帳號(hào)越多,就越容易受到攻擊。

            為刪除你系統(tǒng)上的用戶(hù),用下面的命令:

            [root@deep]# userdel username 為刪除你系統(tǒng)上的組用戶(hù)帳號(hào),用下面的命令: [root@deep]# groupdel username 在終端上打入下面的命令刪掉下面的用戶(hù)。 [root@deep]# userdel adm [root@deep]# userdel lp [root@deep]# userdel sync [root@deep]# userdel shutdown [root@deep]# userdel halt [root@deep]# userdel mail 如果你不用sendmail服務(wù)器,procmail.mailx,就刪除這個(gè)帳號(hào)。 [root@deep]# userdel news [root@deep]# userdel uucp [root@deep]# userdel operator [root@deep]# userdel games 如果你不用X windows 服務(wù)器,就刪掉這個(gè)帳號(hào)。 [root@deep]# userdel gopher [root@deep]# userdel ftp 如果你不允許匿名FTP,就刪掉這個(gè)用戶(hù)帳號(hào)。打入下面的命令刪除組帳號(hào) [root@deep]# groupdel adm [root@deep]# groupdel lp [root@deep]# groupdel mail 如不用Sendmail服務(wù)器,刪除這個(gè)組帳號(hào) [root@deep]# groupdel news [root@deep]# groupdel uucp [root@deep]# groupdel games 如你不用X Windows,刪除這個(gè)組帳號(hào) [root@deep]# groupdel dip [root@deep]# groupdel pppusers [root@deep]# groupdel popusers 如果你不用POP服務(wù)器,刪除這個(gè)組帳號(hào) [root@deep]# groupdel slipusers 用下面的命令加需要的用戶(hù)帳號(hào) [root@deep]# useradd username 用下面的命令改變用戶(hù)口令 [root@deep]# passwd username 用chattr命令給下面的文件加上不可更改屬性。 [root@deep]# chattr +i /etc/passwd [root@deep]# chattr +i /etc/shadow [root@deep]# chattr +i /etc/group [root@deep]# chattr +i /etc/gshadow

            14. 阻止任何人su作為root.

            如果你不想任何人能夠su作為root,你能編輯/etc/pam.d/su加下面的行:

            auth sufficient b curity/pam_rootok.so debug

            auth required b curity/pam_wheel.so group=isd

            意味著僅僅isd組的用戶(hù)可以su作為root.

            然后,如果你希望用戶(hù)admin能su作為root.就運(yùn)行下面的命令。

            [root@deep]# usermod -G10 admin

            16. 資源限制

            對(duì)你的系統(tǒng)上所有的用戶(hù)設(shè)置資源限制可以防止DoS類(lèi)型攻擊(denial of service attacks)

            如最大進(jìn)程數(shù),內(nèi)存數(shù)量等。例如,對(duì)所有用戶(hù)的限制象下面這樣:

            編輯/etc curity mits.con加: * hard core 0 * hard rss 5000 * hard nproc 20

            你也必須編輯/etc/pam.d/login文件加/檢查這一行的存在。

            session required b curity/pam_limits.so

            上面的命令禁止core files“core 0”,限制進(jìn)程數(shù)為“nproc 50“,且限制內(nèi)存使用 為5M“rss 5000”。

            17. The /etc lo.conf file

            a) Add: restricted

            加這一行到每一個(gè)引導(dǎo)映像下面,就這表明如果你引導(dǎo)時(shí)用(linux single),則需要一個(gè)password.

            b) Add: password=some_password

            當(dāng)與restricted聯(lián)合用,且正常引導(dǎo)時(shí),需要用戶(hù)輸入密碼,你也要確保lilo.conf  文件不能被不屬于root的用戶(hù)可讀,也免看到密碼明文。下面是例子:

            編輯/etc lo.conf加: boot=/dev/sda map=/boot/map install=/boot/boot.b prompt timeout=50 Default=linux restricted ?add this line. password=some_password ?add this line. image=/boot mlinuz-2.2.12-20 label=linux initrd=/boot/initrd-2.2.12-10.img root=/dev/sda6 read-only [root@deep]# chmod 600 /etc lo.conf (不再能被其他用戶(hù)可讀). [root@deep]# /sbin lo -v (更新lilo配置). [root@deep]# chattr +i /etc lo.conf(阻止該文件被修改)



            關(guān)鍵詞:

            評(píng)論


            相關(guān)推薦

            技術(shù)專(zhuān)區(qū)

            關(guān)閉