LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 01-12-2012, 05:49 PM   #1
nec207
Member
 
Registered: Apr 2011
Posts: 77

Rep: Reputation: 0
Unhappy Can some one explain to me why open ports are bad?


Can some one explain to me why open ports are bad?

Some one was saying some hackers use port scanning tools ? Not sure what it is or how it works but using this can they put bad software on your computer or steal stuff from you or find out what you have on the computer and what web sites you go to?

Some people say a good OS and good firewall will close all open ports and stop port scanning.

I had IT guy look at my logs and he was saying people or bots are opening up ports using UPnP IGD hacking , with the command AddPortMapping.

No idea what this is or what he is talking about .


Is my security too low?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-12-2012, 06:50 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Distribution: Arch, Gentoo, Slackware
Posts: 1,441

Rep: Reputation: 228Reputation: 228Reputation: 228
It really matters what services you are running.
 
Old 01-13-2012, 04:29 PM   #3
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 354

Rep: Reputation: 23
The best practice is to never have open ports exposed to the Public Internet if not needed. Regardless of a service running, it is consuming resources from your box & bandwidth.

You can delete the unneeded ports with the 'iptables' command, make sure you save your modified iptables rules after you remove the open ports.
 
Old 01-13-2012, 05:16 PM   #4
eSelix
Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Kubuntu
Posts: 809

Rep: Reputation: 162Reputation: 162
Despite the inaccuracy of sentence "open ports are bad", the main reason of closing unnecessary ports is that every application can have security "holes", and if one of this hole will be dicovered (sometimes by a hacker) someone can use open port to transfer malicius data uses this vulnerability and do something what was not foreseen by author of program (for example, take control of whole machine).

Of course if some machine is designed to expose services on the Internet (for example a web server) then it must open a port to connection. Without that, it will not work. For not a public access there is a solutions like ports automatically opened after specifc, secret pattern has been send to machine (the knock daemon), or allowing connection only for specific IP addresses.

So, not exactly open ports are bad, but rather applications who opened it. And as rhbegin mentioned, good practise is to minimalize danger and closing not needed ports, for example by firewall or switching off unneeded services.
 
4 members found this post helpful.
Old 01-13-2012, 05:33 PM   #5
celthunder
Member
 
Registered: Feb 2009
Location: Dallas, TX
Distribution: Arch, Gentoo
Posts: 83

Rep: Reputation: 8
ports that are open with no service on them are kind of useless, ports that are open with services on them can be exploited if the software listening isn't secure. The idea of closing them as others said is to minimize the potential for someone to scan for vulnerable software. Also closing them at hardware firewall level can prevent a rogue software from opening it on your computer really doing damage and getting through as they're still blocked from the firewall.
 
1 members found this post helpful.
Old 01-19-2012, 09:58 PM   #6
nec207
Member
 
Registered: Apr 2011
Posts: 77

Original Poster
Rep: Reputation: 0
I think the mix up here at the start of this thread was understanding ports and service and how hackers can use port scanning and what that does .


Why most firwalls close most ports.

Also other thing that comes up with security is people who have web servers at home and people using torrent has this opens alot of ports and there is lots of bandwith do to the open ports they must use.
 
Old 01-23-2012, 01:25 AM   #7
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 656
Blog Entries: 5

Rep: Reputation: 60
Quote:
Originally Posted by nec207 View Post
I think the mix up here at the start of this thread was understanding ports and service and how hackers can use port scanning and what that does .
just example if someone scan server for certain range ip which is mysql installed mean port 3306 is running, once they got it , they will do further scanning about mysql vulnerability for those ip, and they go further further and so on

Quote:
Originally Posted by nec207 View Post
Why most firwalls close most ports.
this is good purpose for the firewall operator to open the port services which is needed to be used only.
example again if your server run mysql, which actually no need to tell outside your mysql is running
just enough for system itself only know its running

Quote:
Originally Posted by nec207 View Post
Also other thing that comes up with security is people who have web servers at home and people using torrent has this opens alot of ports and there is lots of bandwith do to the open ports they must use.
as mentioned before just open what is need, for torrent also the port can be configured properly from firewall, and bandwidth got nothing to do with open port actually

just 5 cent from me
 
Old 01-26-2012, 03:21 PM   #8
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 342

Rep: Reputation: 38
Quote:
Originally Posted by routers View Post
as mentioned before just open what is need, for torrent also the port can be configured properly from firewall, and bandwidth got nothing to do with open port actually
+1
basics-101, disable or remove whats not needed. i have seen some apps/services that provide local system services and they bind a listener to the iface just in case you want to get that service over the network with no way to have the app/service running w/o binding a listener. thats dumb code, but can be handled by a firewall, etc.

so, bottom line is, if its not there or not reachable then if a unknown vulnerability suddenly becomes known the risk associated with such is minimal. as good as that sounds i often see places that do not address the issue head-on by patching or upgrading because they think the external mitigation is good enough, but thats a poor strategy. often times you'll see a network audit pass but a system compliance check fail. if you have something that needs fixing then fix it. i typically apply all of my checking/auditing/compliance/lock-down stuff as local as possible so the further away you get the harder it is to penetrate the system. most places get very very soft once you get by perimeter security, etc.

Last edited by Linux_Kidd; 01-26-2012 at 03:23 PM.
 
Old 02-21-2012, 01:55 PM   #9
raymor
Member
 
Registered: Nov 2005
Posts: 57

Rep: Reputation: 20
A firewall gets it's name from a literal wall designed to keep out actual fire. That may be in a building, or the wall between the engine compartment of your car and the passenger compartment. The idea is to keep any threat (engine fire, bad guy) on one side of the wall, keeping you safe on the other wide of the wall. Open ports are holes in the wall. Any hole (open port) could possibly let an attacker either get in or at least see in, so you don't want any unnecessary open ports. If you look under the dash you'll see the car manufacturer does the same thing. There are several openings in the firewall for wires and such to go through, but no unused openings, no opening larger than necessary, and all openings are sealed with rubber so fire can't get from one side of the wall to the other.
 
Old 02-21-2012, 03:07 PM   #10
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 342

Rep: Reputation: 38
... and the "fw" is only as good as what its made from. physical wall of tinfoil has issues, and bad coding in cisco's asa, etc etc. a fw alone doesnt keep the bad guys out, it just slows them down.

ana hah, another good tagline, adding that to my sig.

Last edited by Linux_Kidd; 02-21-2012 at 03:10 PM.
 
Old 02-21-2012, 07:14 PM   #11
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 3,685

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Let me bstardize a good investing comment made by Peter Lynch: "Know what you're running, and know why you're running it."

The problem here is not so much that, "a port is open," but rather, why it is open, and especially do you know that it is, and do you intend for your computer to be doing that?

If the answer is "no," then you are merely a(nother) "but I had no idea ..." that is waiting to happen.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to block all ports and open only select ports on Ubuntu 7.1 Mr.J Linux - Networking 1 11-18-2008 02:45 AM
open ports for utorrent using iptables n close smpt to that ports shtorrent00 Linux - Networking 2 09-30-2008 03:34 PM
Problem opening ports - ports appear open, but do not work. computer_freak_8 Linux - Software 10 09-20-2008 09:39 PM
Cannot Open Mail Server Ports 25, 110, and 220. Other Ports will open. Binxter Linux - Newbie 9 11-29-2007 02:03 AM
is it bad to have open ports? Murdock1979 Linux - Security 13 03-30-2006 07:34 PM


All times are GMT -5. The time now is 05:20 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
Open Source Consulting | Domain Registration