LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-15-2005, 09:40 AM   #1
djc
Member
 
Registered: Mar 2004
Posts: 54

Rep: Reputation: 15
why port scans from BEHIND nat/firewall are inaccurate?


I recently got a new ISP and after configuring I wanted to port scan my ip from outsite my home network to make sure the open port footprint was as I expected.
I was very thrown at first when I got so many reports of open ports (thirty something). I quickly realized I was scanning from a machine on my work network which was behind a firewall/nat/proxy server.

However, the next day after configuring my firewall at work to allow just my host all outbound access (all ports and protocols) and doing the port scan again I was lost as to why I still got the same inaccurate results?

I got NO info from the vendor of my firewall (through newsgroup posts) so I decided to post here thinking now that this is probably a common issue to all firewall/nat/proxy devices with regard to what I am trying to do. To reiterate, I am trying to get an accurate port scan of a machine FROM BEHIND a nat/firewall/proxy device.

1) so what are the issues with being able to do this? Is it possible?

I tried a couple different port scanners from different clients and all had the same results. (nmap on suse linux 9.1, superscan4 on windows 2000) I am even doing standard full connect tcp scans. I realize its a firewall/nat/proxy issue and not a client issue but I don't know what, if anything, I can do about it.

any info on this would be greatly appreciated.
 
Old 11-15-2005, 06:46 PM   #2
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
an easy solution is the shields up service at GRC this will externally scan your host to give you an idea of what is visible from the outside.
 
Old 11-15-2005, 07:32 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
If that does not work you will need to run the scan from a machine that is on the same network, and whose scan will not route through the proxy server you described.

If you get really desparate, you can at least find out which ports have running/listening services with
Code:
netstat -atun
(I am assuming this is a Linux box you are talking about..)
 
Old 11-16-2005, 07:34 AM   #4
djc
Member
 
Registered: Mar 2004
Posts: 54

Original Poster
Rep: Reputation: 15
thank you for the replies. I have used grc.com to check the machine in question however what I am really interested in is to learn 'why' these scans are inaccurate and 'how' I may be able to configure the firewall (generally speaking, I know, I have not stated what firewall I'm using) to allow them to be accurate, 'if' that is even possible.

I do appreciate the comments though. Thanks.
 
Old 11-16-2005, 09:49 AM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Basically, if you want the scan against your local machine to be accurate you should not have a NAT device or proxy server sitting between you and the port scanner.
 
Old 11-16-2005, 10:56 AM   #6
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
[edit]My post was useless after re-reading [edit]

Last edited by lord-fu; 11-16-2005 at 11:08 AM.
 
  


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
SSH port forwarding thru a NAT Firewall whoever Linux - Networking 3 07-29-2005 03:24 AM
unwanted port scans andy753421 Linux - Networking 1 09-28-2004 05:55 PM
Some firewall scans -- opinions please m0rl0ck Linux - Security 1 08-27-2003 09:26 PM
Port scans!!! tarballedtux Linux - Security 4 10-29-2002 07:18 AM
Port scans KevStA Linux - Networking 2 05-27-2002 05:38 PM

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

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