<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Linux的一些常用命令

      1.查看系統(tǒng)信息 系統(tǒng)版本

      uname-a

      cat /etc/redhat-release

      查看CPU

      lscpu

      內(nèi)存

      free -h

      硬盤

      df -Th

       

      2.firewall防火墻

      啟動(dòng): systemctl start firewalld

      查狀態(tài): systemctl status firewalld

      停止: systemctl disable firewalld

      禁用: systemctl stop firewalld

      在開機(jī)時(shí)啟用一個(gè)服務(wù): systemctl enable firewalld.service

      在開機(jī)時(shí)禁用一個(gè)服務(wù): systemctl disable firewalld.service

      查看服務(wù)是否開機(jī)啟動(dòng): systemctl is-enabled firewalld.service

      查看已啟動(dòng)的服務(wù)列表: systemctl list-unit-files|grep enabled

      查看啟動(dòng)失敗的服務(wù)列表: systemctl --failed

      查詢端口是否開放: firewall-cmd --query-port=80/tcp

      開放80端口: firewall-cmd --permanent --add-port=80/tcp

      移除端口: firewall-cmd --permanent --remove-port=8080/tcp

      查看開放了那些端口: firewall-cmd --list-ports

      重啟防火墻(修改配置后要重啟防火墻): firewall-cmd --reload

       

      重點(diǎn)

      # 指定ip訪問某個(gè)端口規(guī)則 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.100.102" port protocol="tcp" port="80" accept"

      # 禁止指定ip 訪問某個(gè)端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.100.200" port protocol="tcp" port="80" reject"

      # 禁止某個(gè)段的ip 訪問某個(gè)端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="10.0.0.0/24" port protocol="tcp" port="80" reject"

      # 允許指定ip 訪問所有端口 firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.100.100" port protocol="tcp" accept"

      3.Nginx啟動(dòng)相關(guān)命令

      #先校驗(yàn)配置文件: nginx -t

      # 啟動(dòng) nginx:systemctl start nginx

      # 設(shè)置開啟自啟動(dòng): systemctl enable nginx

      # 查看啟動(dòng)狀態(tài): systemctl status nginx

      #修改了配置文件,重啟生效:nginx -s reload

      默認(rèn)配置文件路徑:/etc/nginx/

      默認(rèn)靜態(tài)文件路徑:/usr/share/nginx/html/ 

       

      4.關(guān)于tar命令

      # 解壓:tar -zxvf FileName.tar.gz 

      # 將DirName和其下所有文件(夾)壓縮:tar -zcvf FileName.tar.gz DirName

      5.關(guān)于zip和unzip

      安裝zip指令:apt-get install -y zip 或 yum install -y zip

      安裝unzip命令: apt-get install -y unzip 或 yum install -y unzip

      rocky安裝sudo dnf install zip unzip -y

       

      6.iptables防火墻策略

       

      # 查看iptables服務(wù)狀態(tài)
      service iptables status
      # 或
      /etc/init.d/iptables status
      
      # 檢查iptables是否安裝
      rpm -q iptables
      
      # 查看當(dāng)前iptables規(guī)則
      iptables -L -n

       

      開啟iptables防火墻 systemctl enable iptables

      查看iptables防火墻狀態(tài) systemctl status iptables

      # 允許所有訪問進(jìn)入 iptables -P INPUT ACCEPT

      # 清除所有規(guī)則 iptables -F

      # 原有連接保持 iptables -I INPUT 1 -m state --state RELATED,ESTABLISHED -j ACCEPT

      # 開放22端口

      iptables -A INPUT -p tcp --dport 22 -j ACCEPT

      iptables -A INPUT -p tcp --sport 22 -j ACCEPT

      # 指定端口策略,只允許特定IP訪問2181

      iptables -I INPUT -p tcp --dport 2181 -j DROP

      iptables -I INPUT -s 127.0.0.1 -p tcp --dport 2181 -j ACCEPT

      # redis端口策略,只允許特定IP訪問6776

      iptables -I INPUT -p tcp --dport 6776 -j DROP

      iptables -I INPUT -s 127.0.0.1 -p tcp --dport 6776 -j ACCEPT

      # 開放IOT端口9494,允許所有IP訪問

      iptables -I INPUT -p tcp --dport 9494 -j ACCEPT

      # 開放數(shù)據(jù)庫3306端口

      iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

      # 開放MQTT端口

      iptables -I INPUT -p tcp --dport 1883 -j ACCEPT

      iptables -I INPUT -p tcp --dport 18083 -j ACCEPT

      iptables -I INPUT -p tcp --dport 11883 -j ACCEPT

      iptables -I INPUT -p tcp --dport 4370 -j ACCEPT

      # 設(shè)置默認(rèn)所有訪問禁止

      iptables -P INPUT DROP

      # 保存規(guī)則 service iptables save

      # 重啟iptables systemctl restart iptables

      posted @ 2024-12-02 10:20  Allen3  閱讀(120)  評(píng)論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 亚洲欧美日韩人成在线播放| 好吊视频一区二区三区人妖| 伊人久久大香线蕉网av| 性色av不卡一区二区三区| 久久精品国产99久久6| 黑人av无码一区| 亚洲一卡2卡三卡四卡精品| 日韩区一区二区三区视频| 国产又色又爽又黄刺激视频| 亚洲性日韩一区二区三区| av中文字幕国产精品| 国产欧美综合在线观看第十页| 免费人成年激情视频在线观看| 91蜜臀国产自产在线观看| 99国产精品一区二区蜜臀| 18无码粉嫩小泬无套在线观看| 亚洲乱妇老熟女爽到高潮的片| 蛟河市| 99精品国产精品一区二区| 肥臀浪妇太爽了快点再快点| 久久精品国产福利一区二区| 亚洲啪啪精品一区二区的| 狠狠躁夜夜躁人人爽天天古典| 国产日产亚洲系列av| 人妻少妇精品久久| 深夜释放自己在线观看| 国产福利在线观看免费第一福利| 色综合色狠狠天天综合网| 国产色无码专区在线观看| 国产精品人成视频免费播放| 中国孕妇变态孕交xxxx| 日韩精品一区二区亚洲专区| 在线免费成人亚洲av| 亚洲精品麻豆一二三区| 国产美女久久久亚洲综合| 欧美白人最猛性xxxxx| 亚洲性一交一乱一伦视频| 2020国产欧洲精品网站| 日本污视频在线观看| 中文字幕熟妇人妻在线视频| 亚洲一区二区精品偷拍|