Linux(CentOS 7) 安全加固之非业务端口服务关闭 postfix port 25
关闭TCP 25 端口对应的服务
[0 root@Qvps /root] #cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[0 root@Qvps /root] #uname -r
3.10.0-1160.el7.x86_64
1. 确认对应端口的进程
#ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 *:22 *:*
LISTEN 0 100 [::1]:25 [::]:*
LISTEN 0 128 [::]:22 [::]:*
#netstat -antlp | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 695/master
tcp6 0 0 ::1:25 :::* LISTEN 695/master
[0 root@Qvps /data] #ps aux | grep 695
root 695 0.0 0.1 89708 2076 ? Ss 08:34 0:00 /usr/libexec/postfix/master -w
root 13526 0.0 0.0 112816 944 pts/0 S+ 09:26 0:00 grep --color=auto 695
# rpm -qf '/usr/libexec/postfix/master'
postfix-2.10.1-9.el7.x86_64
2. 查找与关闭对应服务
# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off
#systemctl list-unit-files | grep post
postfix.service enabled
#systemctl disable --now postfix.service
Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.
3. 确认结果,端口已关闭
[0 root@Qvps /data] #systemctl list-unit-files | grep postfix
postfix.service disabled
[0 root@Qvps /data] #ps aux | grep postf
root 13743 0.0 0.0 112812 944 pts/0 S+ 09:29 0:00 grep --color=auto postf
[0 root@Qvps /data] #ss -ntl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:22 *:*
LISTEN 0 128 [::]:22 [::]:*
Linux(CentOS 7) 安全加固之非业务端口服务关闭 postfix port 25的更多相关文章
- Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因
原文:Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因 今天试了下在虚拟机上利用CentOS系统的yum命令安装好了httpd(apache2.4.6), ...
- Linux Centos 6.9中SSH默认端口修改的坑
关于Linux Centos6.5的SSH默认端口修改的博客有一大堆,我在这里就不啰嗦了,但是面对Centos 6.9,就会发现有一个巨坑: 修改iptables之后执行下面的命令后: # servi ...
- linux(centos 6.4)下安装php memcache服务端及其客户端(详细教程)
前言 在搭建个人博客时,由于没有使用任何框架,纯手工code前台和后台,导致遇到许多问题,其中一个问题就是mysql连接导致的页面相应速度异常低.在查询各种途径后,只能考虑使用memcache缓存.在 ...
- 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署
阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...
- 在CentOS Linux系统上,添加新的端口,启用ssh服务
SSH作为Linux远程连接重要的方式,如何配置安装linux系统的SSH服务,如何开启SSH? SSH是什么? SSH 为 Secure Shell 由 IETF 的网络工作小组(Network W ...
- 在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作
CentOS 7.3 这部分以在 CentOS 7.3 上安装 nginx 服务为例,说明在 Linux 实例中如何检查 TCP 80 端口是否正常工作. 登录 ECS 管理控制台,确认实例所在安全组 ...
- Linux常用的安全加固
一.账号和口令 1.1 禁用或删除无用账号 减少系统无用账号,降低安全风险. 操作步骤userdel <用户名> //删除不必要的账号.passwd -l <用户名> //锁定 ...
- Linux CentOS 配置Tomcat环境
一.下载Tomcat 下载Tomcat方式也有两种,可以参考我的前一篇博文Linux CentOS配置JDK环境,这边就不再赘述. 二.在Linux处理Tomcat包 1.创建tomcat文件夹 mk ...
- NoSql1 在Linux(CentOS)上安装memcached及使用
前言: 今天是初五,生活基本要从过年的节奏中回归到正常的生活了,所以想想也该想想与工作有关的事情了.我之前在工作中会经常使用memcached和redis,但是自己一直没有时间系统的好好看 ...
随机推荐
- 关于Kotlin中日志的使用方法
1 引言 想必学过Java的人都知道一个@Slf4j使用得多么的舒服: @Slf4j public class TestController{ @GetMapping("/test" ...
- 在IntellJ中查看JavaDoc
1. [perference--Editor--General--Code Completion] 勾上Show the documentation popup in ** ms 2. 快速显示Ja ...
- Bug Hunt UVA - 1596
In this problem, we consider a simple programming language that has only declarations of onedimens ...
- 关于GWAS的质量控制步骤顺序疑问?不同指导不同文献的建议各不相同。
事情是这样的,刚开始接触GWAS就一定会接触到数据质量控制这个东西.我们可以看到网络上各种各样的指导,都是分为individual quality control and snp quan ...
- JDBC_12_JDBC事务
JDBC事务 JDBC中事务默认自动提交,每执行一次SQL就会自动提交一次. 这样的话可能出现数据安全性问题. connection.setAutoCommit(false) false代表关闭自动提 ...
- Day11_55_在Map集合中使用泛型
在Map集合中使用泛型 ``` import java.util.HashMap; import java.util.Iterator; import java.util.Map; import ja ...
- B - Tempter of the Bone(DFS+剪枝)
The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it u ...
- WordPress伪静态规则设置
伪静态:即网站本身是动态网页如.php..asp..aspx等格式,而这类网页还带"?"加参数来读取数据库.开启伪静态后,动态网页即被转换重写成静态网页类型页面. WordPres ...
- Laravel路由中不固定数量的参数如何实现?
前言 laravel是个好框架,我也在学习和使用,并且在公司里推广,最近在读 Laravel 源码的时候,发现了一个段特别有趣的代码,大家请看: ... 这三个点是做什么用的呢?我查了 PHP 的手册 ...
- 【Idea】实用插件列表
1.Translation : 翻译 2.CodeGlance:代码预览 3.Lombok:优雅编程插件 4.GenerateSerialVersionUID :自动生成序列化ID 5.CamelCa ...