LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 04-20-2007, 05:55 AM   #1
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Rep: Reputation: 30
linux firewall


Hi

the question is :
what is the command to chechk open ports in my computers ?

then if there are no open tcp/udp ports does still i need a firewall activated ?

thanks in advance

Maurizio
 
Old 04-20-2007, 07:16 AM   #2
alienux
Member
 
Registered: Sep 2006
Location: Dayton, Ohio
Distribution: Slackware 12, Fedora Core, PCLinuxOS
Posts: 194

Rep: Reputation: 30
Use the "netstat" command. There are various arguments for it.

For example, to list all processes and process ID associated with ports without mapping port numbers to friendly names, showing tcp ports, use:

Code:
netstat -anp --tcp
You can check

Code:
netstat --help
for more options.
 
Old 04-20-2007, 11:08 AM   #3
bong.mau
Member
 
Registered: Apr 2004
Posts: 391

Original Poster
Rep: Reputation: 30
i isssued the command..

[bong@localhost ~]$ netstat -anp --tcp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 1 0 xxx.xxx.xxx.xxx:32791 yyy.yyy.yy.yyy:8080 CLOSE_WAIT 4451/konquerorz9GTL

i issued the command when connected to internet...

i omitted local address and foreign address with a seried pf x and y for privacy reason.....

it appears local tcp port 32791 is connected to remote 8080
please if i'm worng ..explain me..
the state column report Close_wait

what does this means.......?
that the connection is established but the port is closed ?

to be more clear......this morning i buy a linuxmagazine where a tip informed me that the concept of a firewall MUST ported from winxp may be not the same in linux if there are not open ports.......infact the tip continue to inform me that ubuntu has not a preconfigured firewall...

my env: is mandriva 10.1 running with shorewall
so i opened this thread to help me verifying this...


please help me clarifying my doubts...
if i am in a such situation does still i need a firewall ?


thanks in advance

Maurizio
 
  


Reply



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
BSD Firewall vs Linux Firewall ? rootlinux Linux - Security 5 08-29-2007 07:38 AM
Linux Firewall Vs Firewall Appliance depam Linux - Security 4 11-20-2006 01:55 PM
how to m$ win client+firewall to linux sshd and use linux to access the M$ computer c_mitulescu Linux - Networking 7 05-14-2004 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration