关闭25端口,怎么关闭阿。。。

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
jo_dy
帖子: 68
注册时间: 2010-01-31 2:29

关闭25端口,怎么关闭阿。。。

#1

帖子 jo_dy » 2014-08-18 9:45

#netstat -ano
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 关闭 (0.00/0/0)
tcp6 0 0 ::1:631 :::* LISTEN 关闭 (0.00/0/0)
tcp6 0 0 :::25 :::* LISTEN 关闭 (0.00/0/0)


#lsof -i:25

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 1962 root 12u IPv4 11717 0t0 TCP *:smtp (LISTEN)
master 1962 root 13u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5455 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5455 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5457 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5457 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5458 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5458 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5459 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5459 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5461 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5461 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5465 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5465 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5466 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5466 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5469 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5469 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5471 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5471 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5472 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5472 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5473 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5473 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5475 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5475 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5477 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5477 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5480 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5480 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5482 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5482 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5485 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5485 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
smtpd 5486 postfix 6u IPv4 11717 0t0 TCP *:smtp (LISTEN)
smtpd 5486 postfix 7u IPv6 11718 0t0 TCP *:smtp (LISTEN)
jo_dy
帖子: 68
注册时间: 2010-01-31 2:29

Re: 关闭25端口,怎么关闭阿。。。

#2

帖子 jo_dy » 2014-08-18 9:46

xubuntu 里面没有chkconfig,很但疼,其他的也没怎么用过。。。。。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关闭25端口,怎么关闭阿。。。

#3

帖子 poloshiao » 2014-08-18 13:50

簡單方法
使用 ufw (gufw 是 ufw 的圖形前端)
原則禁止 例外開放
只針對 imput 不針對 output
https://help.ubuntu.com/community/UFW
jo_dy
帖子: 68
注册时间: 2010-01-31 2:29

Re: 关闭25端口,怎么关闭阿。。。

#4

帖子 jo_dy » 2014-08-18 15:34

poloshiao 写了:簡單方法
使用 ufw (gufw 是 ufw 的圖形前端)
原則禁止 例外開放
只針對 imput 不針對 output
https://help.ubuntu.com/community/UFW
感谢
我是直接关闭服务,不想用防火墙区墙。。。。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关闭25端口,怎么关闭阿。。。

#5

帖子 poloshiao » 2014-08-18 18:25

头像
oneleaf
论坛管理员
帖子: 10455
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

Re: 关闭25端口,怎么关闭阿。。。

#6

帖子 oneleaf » 2014-08-18 20:45

sudo apt-get purge sendmail postfix
jo_dy
帖子: 68
注册时间: 2010-01-31 2:29

Re: 关闭25端口,怎么关闭阿。。。

#7

帖子 jo_dy » 2014-08-19 11:13

oneleaf 写了:sudo apt-get purge sendmail
感谢管理员大大阿,
我用的方法是
service postfix stop
update-rc.d -f postfix remove
jo_dy
帖子: 68
注册时间: 2010-01-31 2:29

Re: 关闭25端口,怎么关闭阿。。。

#8

帖子 jo_dy » 2014-08-19 11:14

centos里面的chkconfig 相当于 xubuntu的update-rc.d
回复