LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-08-2006, 01:32 PM   #1
PostPCMan
LQ Newbie
 
Registered: Jul 2004
Posts: 19

Rep: Reputation: 0
What is my firewall doing?


I'm trying to connect to an application that requires a few unusual ports (galleon / TiVo) and, for some reason, they seem to be blocked. I am running Ubuntu 6.06, desktop version, and I never intentionally configured a firewall (since I've got a netscreen between my linux box and the world).

Here's what I don't understand. The firewall seems to be passing everything through:
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
but nmap shows that some ports are closed and/or filtered. When I run it while the server application is running, I get:

sudo nmap -sU -sT -p "T:1099,T:7288,U:5353,T:1527,U:2190,T:8081" localhost

Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2006-08-08 10:37 PDT
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
1099/tcp open unknown
1527/tcp open tlisrv
2190/udp open|filtered unknown
5353/udp open|filtered unknown
7288/tcp closed unknown
8081/tcp closed blackice-icecap

If I run it with the server application stopped, I get:
Starting Nmap 4.03 ( http://www.insecure.org/nmap/ ) at 2006-08-08 10:57 PDT
Interesting ports on aparicio (192.168.198.211):
PORT STATE SERVICE
1099/tcp closed unknown
1527/tcp closed tlisrv
2190/udp closed unknown
5353/udp closed unknown
7288/tcp closed unknown
8081/tcp closed blackice-icecap

Nmap finished: 1 IP address (1 host up) scanned in 0.188 seconds
What is happening? And what is blackice-icecap. Neither synaptic nor "man -k blackice" turns up anything. What about tlisrv?

I'm running nmap on the machine being tested, and either "localhost" or the external IP address gives the same results.

Thanks for the help.
 
Old 08-09-2006, 02:02 PM   #2
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
To see what is running that is using port 1527 you should issue this command: "netstat -pant" This will list all open connections and all ports that are opened and what program is actually using this connection or port.

Also when it list "blackice-icecap" as port 8081 it is only listing that because that is what is commonly used for port 8081. It's closed anyway so it doesn't really matter. No program is taking up 8081. Same goes for tlisrv. Use netstat to see what it really is.
 
Old 08-09-2006, 08:27 PM   #3
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Quote:
nmap shows that some ports are closed and/or filtered.
The reason some ports show up as open|filtered is because they are UDP ports. If a UDP port is open, then a probe packet to that port will simiply be accepted and no reply will be sent (that is how UDP works). If the UDP port is closed, then a ICMP message is sent in reply, so the scanner actually gets back a reply. The difficulty is that if a systems firewall is configured to drop packets to that port, then no reply is sent back either. So the scanner has no way to distinguish between an open port or a filtered port, as they are simply judged by a lack of a response to the probe packet. See the nmap man page section on UDP scanning for more details.

Quote:
I'm running nmap on the machine being tested, and either "localhost" or the external IP address gives the same results.
Note that "scanning yourself" can give you weird results (especially with UDP scans) and can give you an incorrect picture of your firewall security. Ideally you would want to scan from a seperate system inside and outside of the LAN.

Also note that your firewall is effectively off (it is set to accept everything) so everything you are seeing is the scan interacting with the applications or network stack.

Last edited by Capt_Caveman; 08-09-2006 at 08:29 PM.
 
  


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
router billion 5102 has firewall and software firewall tests aus9 Linux - Security 6 12-31-2006 10:09 PM
using a router with firewall, local firewall waste? Michael_aust Linux - General 1 03-26-2006 08:02 AM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 12:32 PM

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

All times are GMT -5. The time now is 08:55 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