LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-16-2010, 06:17 PM   #1
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Rep: Reputation: 16
How to detect whether firewall service is provided by server or by ISP?


I have two servers behind different networks. First network is protected with firewall provided by the router and there is no firewall in the server:

Code:
[root@martin ~]# nmap --reason -n -PN -p445 192.168.217.73

Starting Nmap 5.00 ( http://nmap.org ) at 2010-09-16 13:57 EEST
Interesting ports on 192.168.217.73:
PORT    STATE    SERVICE      REASON
445/tcp filtered microsoft-ds no-response

Nmap done: 1 IP address (1 host up) scanned in 2.15 seconds
[root@martint ~]#
The other server is in the second network and there is no firewall service provided by the router, but firewall is activated in the server:

Code:
[root@martin ~]# nmap --reason -n -PN -p9731 192.168.13.19

Starting Nmap 5.00 ( http://nmap.org ) at 2010-09-16 13:56 EEST
Interesting ports on 192.168.13.19:
PORT     STATE    SERVICE REASON
9731/tcp filtered unknown no-response

Nmap done: 1 IP address (1 host up) scanned in 2.15 seconds
[root@martin ~]#
As you see, there are no difference in nmap output

If I check with tcpdump, which packets are sent from 192.168.217.73 and 192.168.13.19(tcpdump -i eth0 src host 192.168.217.73 and tcpdump -i eth0 src host 192.168.13.19 respectively) towards me during nmap scan, there are none. It's understandable, as there should be no reply when port is filtered.

Is there somehow possible to detect, whether firewall is active in the server or in the router?
 
Old 09-17-2010, 11:36 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Wouldn't traceroute do the trick as long as you specify the port? Seeing where the packets die should give you an indication of where the firewall is.
 
Old 09-17-2010, 11:59 AM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by m4rtin
If I check with tcpdump, which packets are sent from 192.168.217.73 and 192.168.13.19(tcpdump -i eth0 src host 192.168.217.73 and tcpdump -i eth0 src host 192.168.13.19 respectively) towards me during nmap scan, there are none. It's understandable, as there should be no reply when port is filtered.
Nyet. If it's your host-level firewall doing the filtering, tcpdump(8) will still show the TCP SYN packets being received. If it's a perimeter firewall (sitting between your host and the scanner), tcpdump(8) will of course show nothing.
 
Old 09-18-2010, 12:35 PM   #4
OlRoy
Member
 
Registered: Dec 2002
Posts: 306

Rep: Reputation: 86
I'd suggest you enable logging on your router or host based firewall if you haven't already to answer your question. Just grep for log entries coming from your IP that is doing the Nmap scan. The other option is like you said, tcpdump or some other protocol analyzer, and if that's the route you take, I agree with anomie.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure Network Booting Service (in RHEL 3 using GUI tool provided with it ) jatin Linux - Newbie 5 06-04-2010 09:50 AM
Squid / IPTables configuration: Dynamic IP Address provided by ISP vikram_cvk Linux - Networking 2 11-06-2009 08:59 AM
Do you use the e-mail account provided by your ISP? Mega Man X General 18 01-11-2009 02:40 AM
how to auto detect the service of sendmail server using heartbeat dhanju Linux - Networking 1 10-24-2005 05:05 AM
Checking Speedtouch 330 ADSL modem is working before service is provided? Proud Linux - Networking 6 08-11-2004 02:30 PM

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

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