Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2583889
  • 博文数量: 323
  • 博客积分: 10211
  • 博客等级: 上将
  • 技术积分: 4934
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-27 14:56
文章分类

全部博文(323)

文章存档

2012年(5)

2011年(3)

2010年(6)

2009年(140)

2008年(169)

分类: 系统运维

2008-05-08 14:30:19

怎样在AIX下禁用某些端口(FTP,TELNET...)
1.修改/etc/inetd.conf 文件,比如想禁用FTP,就注释FTP这一行。
#ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd
2.刷新服务: refresh -s inetd 或 refresh -g tcpip
 
另外一种方法就是修改/etc/services文件,但这种方法需要重启机器才能生效!其实网络防火墙也有这样的功能,而且直观的多。
 
查看端口对应的进程或服务的方法:
Solution
Here is a method that can be used to determine what process is using a particular port:
1.
Run netstat to get the address of the port you need to check:
eg.
[root:/:] netstat -Aan | grep 8880
701995f0 tcp4 0 0 *.8880 *.* LISTEN
2.
Now use the address seen in the first column as the first parameter to the rmsock command. The second parameter is "tcpcb"
eg.
[root:/:] rmsock 701995f0 tcpcb
The socket 0x70199400 is being held by process 26792 (java).
Please note.... rmsock is used to remove sockets that do not have file descriptors. However, rmsock doesn't remove a socket that still has a valid file descriptor but, instead, returns the identity of the process owner.
3.
Finally, use "ps -ef" to identify the actual process.
阅读(2273) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~