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 10-31-2001, 01:14 PM   #1
santiagodelgado
LQ Newbie
 
Registered: Oct 2001
Posts: 15

Rep: Reputation: 0
Iptables Firewall Leak?


I just set up an iptables firewall on my Linux box and when I nmap'ed it, instead of not being able to see the ports I had closed, nmap found them and said they were "filtered". Does this pose any kind of security risk? Is there any way to configure iptables so that it doesn't even let port scanners like nmap know that there is a server bound to the port?

Thanks.
 
Old 10-31-2001, 04:22 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
This will not pose any security risk in itself.
I think you'll find this an interesting answer.

IMO tho, covering up ports like mentioned there won't lower risks. It's in the "security by obscurity" corner in other words providing a false sense of security.

---edit
Uh. Spose I better elaborate a bit on it instead of cutting it this short. The TCP/IP 3-way handshake states that initiating traffic starts by sending a packet with the SYN flag set (+some other options) to your servers' service port:
N pSYN -> you
If all goes well youll send one back, and tack a n ACK on, saying theyre recognized wanting a connection, welcome.
N <- pSYN/ACK you
Now they acknowledge your ACK:
N pACK -> you.

If a port is not "bound" by an application, it is not in a listening state, the system responds with :
N pSYN -> you
N <- pRST(/ACK) you
*Note: this only goes as far as connect(SYN)/half-open(stealth) scans, which can only be used for TCP. FIN scans get the same treatment when a TCP port is encountered, but the system will act with an ICMP packet when UDP ports are targetted.

Ok. back to the box.
You see for UDP scans an ICMP message is sent. You *could* decide to block (nearly) all ICMP type 3 traffic, but since UDP relies on ICMP for control messages this will break some stuff.

Ok, this shows I'm on Ipchains and not using Netfilter/Iptables right now, but IIRC, the basics' still the same. When you use REJECT on Ipchains for some awfull reason it sends a ICMP (port unreach) instead of an RST :-] OTOH, the DENY strategy blackholes traffic, it just drops the packets on the binary carpet. Looking at BSD's ipfw it has a built-in option to send RST's, Ipchains' can work with a helper app to achieve the same, other ppl even went as far as to redirect ports to a known closed one to achieve sending RST's :-]

So, by now you know what to figure out for yourself: use a DENY-type strategy, and be known to *definately have* a firewall (which is kinda interesting for practicing ACK scanning etc etc on), or use a REJECT-type strategy, meaning you won't be "l33t-invisible" but appearing more "innocent".

HTH somehow.

Last edited by unSpawn; 10-31-2001 at 05:26 PM.
 
Old 10-31-2001, 06:44 PM   #3
santiagodelgado
LQ Newbie
 
Registered: Oct 2001
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks.

unSpawn, thank you very much. If the response would have been any more complete it just might have been inserted into some kind of SECURITY-HOWTO. Thanks again.
 
  


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
Iptables with iptables-firewall.conf arno's matt3333 Slackware 16 06-28-2007 07:20 AM
iptables and firewall J4b0l Linux - Security 5 10-10-2005 08:02 AM
IPTABLES firewall Vs rc firewall netguy2000 Linux - Security 7 02-28-2004 04:31 AM
rc.firewall vs iptables dunmarie Linux - Security 2 10-09-2003 02:00 PM
firewall iptables SchwipSchwap Linux - Newbie 2 09-14-2002 06:41 AM

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

All times are GMT -5. The time now is 12:07 AM.

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