Centos6.x Desktop 關閉防護墻及無關服務
生活随笔
收集整理的這篇文章主要介紹了
Centos6.x Desktop 關閉防護墻及無關服務
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1,查看iptables并關(guān)閉服務、禁止自啟動
~]#?service?iptables?status ~]#?service?iptables??stop? ~]#?chkconfig??iptables??off? ~]#?service?iptables?status2,關(guān)閉selinux
~]#?sed?-i?'s@SELINUX=.*@SELINUX=disabled@'?/etc/selinux/config ~]#?setenforce?03,重啟生效,并確認狀態(tài)
~]#?reboot ~]#?getenforce4,查看啟動的服務
~]#?netstat?-tnlp Active?Internet?connections?(only?servers) Proto?Recv-Q?Send-Q?Local?Address???????????????Foreign?Address?????????????State???????PID/Program?name??? tcp????????0??????0?0.0.0.0:111?????????????????0.0.0.0:*???????????????????LISTEN??????1321/rpcbind???????? tcp????????0??????0?0.0.0.0:22??????????????????0.0.0.0:*???????????????????LISTEN??????1626/sshd??????????? tcp????????0??????0?0.0.0.0:43638???????????????0.0.0.0:*???????????????????LISTEN??????1449/rpc.statd?????? tcp????????0??????0?127.0.0.1:631???????????????0.0.0.0:*???????????????????LISTEN??????1505/cupsd?????????? tcp????????0??????0?127.0.0.1:25????????????????0.0.0.0:*???????????????????LISTEN??????1706/master????????? tcp????????0??????0?:::111??????????????????????:::*????????????????????????LISTEN??????1321/rpcbind???????? tcp????????0??????0?:::22???????????????????????:::*????????????????????????LISTEN??????1626/sshd??????????? tcp????????0??????0?::1:631?????????????????????:::*????????????????????????LISTEN??????1505/cupsd?????????? tcp????????0??????0?::1:25??????????????????????:::*????????????????????????LISTEN??????1706/master????????? tcp????????0??????0?:::49753????????????????????:::*????????????????????????LISTEN??????1449/rpc.statd5,關(guān)閉無關(guān)rpcbind 、rpcbind 、cupsd服務
~]#?service?nfslock?stop ~]#?chkconfig?nfslock?off ~]#?service?rpcbind?stop ~]#?chkconfig?rpcbind?off ~]#?service?cups?stop ~]#?chkconfig?cups?off6,查看現(xiàn)有服務
~]#?netstat?-tnlp Active?Internet?connections?(only?servers) Proto?Recv-Q?Send-Q?Local?Address???????????????Foreign?Address?????????????State???????PID/Program?name??? tcp????????0??????0?0.0.0.0:22??????????????????0.0.0.0:*???????????????????LISTEN??????1596/sshd??????????? tcp????????0??????0?127.0.0.1:25????????????????0.0.0.0:*???????????????????LISTEN??????1676/master????????? tcp????????0??????0?:::22???????????????????????:::*????????????????????????LISTEN??????1596/sshd??????????? tcp????????0??????0?::1:25??????????????????????:::*????????????????????????LISTEN??????1676/master轉(zhuǎn)載于:https://blog.51cto.com/jameszhan/2323242
總結(jié)
以上是生活随笔為你收集整理的Centos6.x Desktop 關閉防護墻及無關服務的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 在Object-C中学习数据结构与算法之
- 下一篇: Count Primes(leetcod