AIX下怎样禁用某些端口?

九月 16, 2009 · Filed Under Aix, IBM 

AIX下怎样禁用某些端口
 
怎样在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 0×70199400 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.

相关文章

Comments

Leave a Reply