Go Back   TechArena Community > Technology > Networking & Security
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Close ports in linux

Networking & Security


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-04-2010
Member
 
Join Date: Mar 2010
Posts: 200
Close ports in linux
  

Hello,
I made a
Code:
netstat-a - inet
to see that bcp more open port that I want, I want to do that with port 80 ssh ftp and mysql. How can i do this, if you guys have any idea about this then please let me know. Thanks in advance.

Reply With Quote
  #2  
Old 07-04-2010
Member
 
Join Date: Nov 2009
Posts: 583
Re: Close ports in linux

Hello,
You can use iptables (firewall configuration manually). See 'man iptables' lea-linux.org or for more information. Otherwise you can use a firewall while is like shorewall, firestarter. But I think the best way is to use the iptables, this will surely help you. Also I recommend you to go through the man pages of the the iptables, because there are many option for this command you will get confused if you do not know them.
Reply With Quote
  #3  
Old 07-04-2010
Member
 
Join Date: Nov 2009
Posts: 359
Re: Close ports in linux

Hello,
The question is how it reduce the number of open port visible from the outside or how to reduce the number of open port? In the first case, just as noted by the above post, activate the firewall and block access to port not desired. In the second case, one must question the source of the demons who listen to these different ports and close them manually (not ports, services).
Reply With Quote
  #4  
Old 07-04-2010
Member
 
Join Date: Dec 2009
Posts: 296
Re: Close ports in linux

Hello,
I have a similar kind of a problem with the ports and the commands related to the ports under linux. My case is the second as it is posted above, but my problem is that I can not understand what has turned around the order
Code:
netstat-a - inet
What I have to do to eliminate unwanted services? Any help regarding this is appreciated. Thanks in advance.
Reply With Quote
  #5  
Old 07-04-2010
Member
 
Join Date: Nov 2009
Posts: 446
Re: Close ports in linux

Hello,
To find out which ports are listening and the application that uses them, just use this
For example
Code:
test @ ex% lsof | grep LISTEN
583 root 11u IPv4 master 0xc0da4000 0T0 TCP *: smtp (LISTEN)
XFree88 root 1u IPv4 882 TCP * 0T0 0xc0da413c: X11 (LIST
EN)
We see that two processes are listening on two ports and applications that have launched. I hope you have understood what I am trying to say.
Reply With Quote
Reply

  TechArena Community > Technology > Networking & Security
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Close ports in linux"
Thread Thread Starter Forum Replies Last Post
USB ports and Mobo USB ports on PC Case Eta!! Motherboard Processor & RAM 7 12-09-2011 10:34 PM
Moving Mozilla Firefox close tab button to left on Linux Mint 10 $Herbert$ Operating Systems 3 03-01-2011 06:37 AM
mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results _Gentoo_Nile_ Operating Systems 3 20-08-2009 10:46 PM
how to forward ports to different internal ports Abshir Networking & Security 2 30-06-2009 10:26 PM
How to open close ports manually? Darsheet Networking & Security 6 22-05-2009 08:19 AM


All times are GMT +5.5. The time now is 08:48 AM.