LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-15-2012, 05:57 AM   #1
Doknik
LQ Newbie
 
Registered: Jun 2010
Posts: 26

Rep: Reputation: 1
How do I Close or Disable a Port Without IPtables


Hi,
I need to disable or close a couple of ports on a RHEL 5.3 Redhat server, without using IPtables .IPtables is already switched off (disabled)on this system.Is there any alternative way of closing or disabling these ports either via command line or via changes in configuration files .

Your help would be greatly appreciated.
 
Old 02-15-2012, 06:27 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,082

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
One way is in /etc/services (if that's what you're trying to do). Another is in /etc/inetd.conf (but inetd may not be on Redhat anymore?).

Take a look at this thread http://www.linuxquestions.org/questi...se-ports-1515/ for other suggestions.

Hope this helps some.
 
Old 02-15-2012, 01:24 PM   #3
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 785

Rep: Reputation: 174Reputation: 174
close a port

Under Linux and Unix operating systems, a port is only open if something is listening on that port. find the program listening on a port and stop that program, and you have closed that port.

What ports are you seeing open that you wish to close?
 
Old 02-15-2012, 02:04 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by wpeckham View Post
Under Linux and Unix operating systems, a port is only open if something is listening on that port. find the program listening on a port and stop that program, and you have closed that port.
and if you want you can use:
Code:
root@~#>netstat -tapln
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.0.5:53          0.0.0.0:*               LISTEN      15716/named         
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      15716/named         
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      15716/named         
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      16886/master        
tcp        0      0 :::22                   :::*                    LISTEN      5502/sshd           
tcp        0      0 ::1:953                 :::*                    LISTEN      15716/named
to see what ports are opened by which service.
 
  


Reply

Tags
disable, iptables, ports


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto disable/close threads after 2 years. szboardstretcher LQ Suggestions & Feedback 2 06-29-2011 03:04 PM
disable suspend when I close the laptop lid lindylex Debian 5 04-14-2009 08:53 AM
how to close port 1050 please help how to close it. mr norm Linux - General 1 09-12-2008 07:57 AM
iptables rules to close port Sushy Linux - Security 2 10-23-2006 11:25 AM
disable apm standby on lid close laurentwahl Linux - General 0 05-03-2005 03:54 PM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration