Results 1 to 5 of 5
Hi,
I have just working with linux (CentOS 5.2)
I have seen around ten of ports are unwanted ports and need to be closed.
How can I close those port ...
- 07-16-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 4
[SOLVED] How can I close unnecessaries ports ?
Hi,
I have just working with linux (CentOS 5.2)
I have seen around ten of ports are unwanted ports and need to be closed.
How can I close those port via command line ?
- 07-16-2009 #2
- 07-16-2009 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 4
Do you have any link to good resource about iptables ?
- 07-16-2009 #4Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
If ports are "open" it's because there is a process "listening" on that port. You close ports by disabling the processes you don't want running.
You can Google for netstat:
Example:Code:netstat -anp | more Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:902 0.0.0.0:* LISTEN 3539/xinetd tcp 0 0 0.0.0.0:64423 0.0.0.0:* LISTEN 22184/skype tcp 0 0 0.0.0.0:8333 0.0.0.0:* LISTEN 3692/httpd.vmware tcp 0 0 0.0.0.0:53742 0.0.0.0:* LISTEN 4583/rpc.statd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2830/rpcbind tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 3637/sshd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3423/cupsd
Port 902 is open - listening on all interfaces (not any certain IP). PID 3593 has it open, which is xinetd.Code:tcp 0 0 0.0.0.0:902 0.0.0.0:* LISTEN 3539/xinetd
- 07-18-2009 #5Just Joined!
- Join Date
- Feb 2009
- Posts
- 4
Thanks a lot ! , good example


