Linux / UNIX Tech Support Forum
This is a discussion on How can I close unnecessaries ports ? within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi, I have just working with linux (CentOS 5.2) I have seen around ten of ports are unwanted ports and ...
Register free or login to your account to remove all advertisements.
|
|||||||
| CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
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 ? |
|
||||
|
Turn off service using service and chkconfig command:
Code:
service srvname stop chkconfig srvname off Code:
ntsysv Code:
netstat -tulpn
__________________
Vivek Gite |
|
|||
|
Thanks ! This is what I want
I still have some problem Xvnc 5801 Xvnc 5901 There are same service name I would like to close Xvnc for 5801 while still open Xvnc for 5901 how can I do that ? |
|
||||
|
Use firewall to keep one port open for same service while other is closed. Xvnc opens port per user session. So only firewall will help you. See
Redhat / CentOS / Fedora Linux Open Port Be careful with firewall, if you are working on remote server over ssh, you may lockdown yourself. Instead of accept use DROP target to block port.
__________________
Vivek Gite Last edited by nixcraft; 16th July 2009 at 04:06 PM. |
![]() |
|
|
| Tags |
| centos close ports, chkconfig, iptables, iptables close ports, redhat close ports, rhel close ports, service |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Squid Mdaemon Ports | ngalye | Linux software | 2 | 21st January 2009 10:49 AM |
| Freebsd Ports | raj | All about FreeBSD/OpenBSD/NetBSD | 1 | 29th August 2008 09:40 AM |
| Open Mail Ports | B!n@ry | Linux software | 31 | 29th December 2006 02:19 AM |
| How to close the tasks? | jithendra | Linux software | 3 | 17th November 2006 08:59 AM |
| Blocking ports in linux | raj | Linux software | 1 | 10th July 2006 07:31 PM |