久久久久久久性爱潮,国产又粗又猛又爽又黄下载视频,尤物国产在线一区视频,欧美日本国产在线不卡

<sup id="4uqqy"><ol id="4uqqy"></ol></sup>
  • <th id="4uqqy"></th>

      • <strike id="4uqqy"><nobr id="4uqqy"><ins id="4uqqy"></ins></nobr></strike><sup id="4uqqy"></sup><strong id="4uqqy"><u id="4uqqy"></u></strong>
        <sub id="4uqqy"></sub>

          綠色資源網(wǎng):您身邊最放心的安全下載站! 最新軟件|熱門排行|軟件分類|軟件專題|廠商大全

          綠色資源網(wǎng)

          技術(shù)教程
          您的位置:首頁(yè)系統(tǒng)集成網(wǎng)絡(luò)安全 → VPS常用安全設(shè)置相關(guān)內(nèi)容

          VPS常用安全設(shè)置相關(guān)內(nèi)容

          我要評(píng)論 2011/05/26 11:24:47 來(lái)源:綠色資源網(wǎng) 編輯:downcc.com [ ] 評(píng)論:0 點(diǎn)擊:165次

          仍舊新手教程類,適合新手及才接觸VPS的朋友們看一下,主要是關(guān)于VPS安全方面相關(guān)內(nèi)容的,陸續(xù)更新:

          禁止ROOT登陸 保證安全性;

          使用DDoS deflate簡(jiǎn)單防攻擊;

          iftop Linux流量監(jiān)控工具;

          每日自動(dòng)備份VPS到FTP空間;

          升級(jí)LNMP的NGINX到最新版。

          一、修改SSH端口

          vi /etc/ssh/sshd_config

          找到其中的#Port 22(第13行),去掉#,修改成Port 3333

          使用如下命令,重啟SSH服務(wù),注:以后用新端口登陸。

          service sshd restart

          二、禁止ROOT登陸

          先添加一個(gè)新帳號(hào)vpsmm,可以自定義:

          useradd vpsmm

          給vpsmm帳號(hào)設(shè)置密碼:

          passwd vpsmm

          仍舊是修改/etc/ssh/sshd_config文件,第39行:#PermitRootLogin yes,去掉前面的#,并把yes改成no,然后,重啟SSH服務(wù)。以后,先使用vpsmm登陸,再su root即可得到ROOT管理權(quán)限。

          login as: vpsmm
          vpsmm@ip password:*****
          Last login: Tue Nov 22 14:39:58 2010 from 1.2.3.4
          su root
          Password:*********** #注這里輸入ROOT的密碼

          三、使用DDos deflate簡(jiǎn)單防落CC和DDOS攻擊

          使用netstat命令,查看VPS當(dāng)前鏈接確認(rèn)是否受到攻擊:

          netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

          IP前面的數(shù)字,即為連接數(shù),如果說(shuō)正常網(wǎng)站,幾十到一百都屬于正常連接,但出現(xiàn)幾百,或上千的就可以墾定這個(gè)IP與你的VPS之間可能存在可疑連接現(xiàn)象。

          可以使用iptables直接BAN了這個(gè)IP的永久訪問(wèn):

          iptables -A INPUT -s 12.34.56.78 -j DROP

          今天介紹給大家一種方法,是使用軟件DDos deflate來(lái)自動(dòng)檢測(cè)并直接BAN掉的方法,首先我們要確認(rèn)一下iptables服務(wù)狀態(tài),默認(rèn)CENTOS就安裝的,不看也行。

          service iptables status

          安裝DDos deflat:

          wget http://www.inetbase.com/scripts/ddos/install.sh
          chmod +x install.sh
          ./install.sh

          安裝后需要修改/usr/local/ddos/ddos.conf,主要是APF_BAN=1要設(shè)置成0,因?yàn)橐褂胕ptables來(lái)封某些可疑連接,注意EMAIL_TO=“root”,這樣BAN哪個(gè)IP會(huì)有郵件提示:

          ##### Paths of the script and other files
          PROGDIR="/usr/local/ddos"
          PROG="/usr/local/ddos/ddos.sh"
          IGNORE_IP_LIST="/usr/local/ddos/ignore.ip.list"  //IP地址白名單
          CRON="/etc/cron.d/ddos.cron"    //定時(shí)執(zhí)行程序
          APF="/etc/apf/apf"
          IPT="/sbin/iptables"
          ##### frequency in minutes for running the script
          ##### Caution: Every time this setting is changed, run the script with --cron
          #####          option so that the new frequency takes effect
          FREQ=1   //檢查時(shí)間間隔,默認(rèn)1分鐘
          ##### How many connections define a bad IP? Indicate that below.
          NO_OF_CONNECTIONS=150     //最大連接數(shù),超過(guò)這個(gè)數(shù)IP就會(huì)被屏蔽,一般默認(rèn)即可
          ##### APF_BAN=1 (Make sure your APF version is atleast 0.96)
          ##### APF_BAN=0 (Uses iptables for banning ips instead of APF)
          APF_BAN=1        //使用APF還是iptables。推薦使用iptables,將APF_BAN的值改為0即可。
          ##### KILL=0 (Bad IPs are'nt banned, good for interactive execution of script)
          ##### KILL=1 (Recommended setting)
          KILL=1   //是否屏蔽IP,默認(rèn)即可
          ##### An email is sent to the following address when an IP is banned.
          ##### Blank would suppress sending of mails
          EMAIL_TO="root"   //當(dāng)IP被屏蔽時(shí)給指定郵箱發(fā)送郵件,推薦使用,換成自己的郵箱即可
          ##### Number of seconds the banned ip should remain in blacklist.
          BAN_PERIOD=600    //禁用IP時(shí)間,默認(rèn)600秒,可根據(jù)情況調(diào)整

          四、使用iftop查看詳細(xì)網(wǎng)絡(luò)狀況

          安裝IFTOP軟件:

          關(guān)鍵詞:VPS

          閱讀本文后您有什么感想? 已有 人給出評(píng)價(jià)!

          • 0 歡迎喜歡
          • 0 白癡
          • 0 拜托
          • 0 哇
          • 0 加油
          • 0 鄙視
        1. <th id="4uqqy"></th>

            • <strike id="4uqqy"><nobr id="4uqqy"><ins id="4uqqy"></ins></nobr></strike><sup id="4uqqy"></sup><strong id="4uqqy"><u id="4uqqy"></u></strong>
                <sub id="4uqqy"></sub>