Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: how is this stuff getting thru default deny iptables firewall?....
@ 2002-06-22 21:43 James T. Moore
  2002-06-23  7:13 ` Christian Seberino
  0 siblings, 1 reply; 16+ messages in thread
From: James T. Moore @ 2002-06-22 21:43 UTC (permalink / raw)
  To: seberino; +Cc: netfilter

Chris,

    My guess would be that the firewall is allowing reponses to connections
that are already established, but its impossible to say for sure without
seeing the script used to create the firewall.

Here is an example:

$IPTABLES -A FORWARD -o $INET_IFACE -d $DNS_SERV1 -s $PRIV_LAN -p
udp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT

$IPTABLES -A FORWARD -i $INET_IFACE -s $DNS_SERV1 -d $PRIV_LAN -p
udp --sport 53 -m state --state ESTABLISHED -j ACCEPT


The first rule allows the clients on the private LAN to query the dns
server. These packets can be part of a new or established connection so the
clients can create new connections to connect to the DNS server.

The second rule allows the DNS server to respond to the clients' request.
These packets can only be part of an established connection so the DNS
server (or any other host) can not create a new connection into the private
LAN unless there are other rules to allow it.


J.T.




>Date: Sat, 22 Jun 2002 10:30:55 -0700
>From: Christian Seberino <seberino@spawar.navy.mil>
>To: netfilter@lists.samba.org
>Subject: how is this stuff getting thru default deny iptables firewall?....
>
>My firewall *only* forwards SSH stuff to private LAN.
>
>It forwards *everything* _from_ private LAN to Internet however.
>
>How can the private LAN use DNS which it does????
>
>How is DNS server returning the info thru firewall
>if it *only* allows SSH??!?!?!?
>
>Chris



^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: how is this stuff getting thru default deny iptables firewall?....
@ 2002-07-09 19:43 j davis
  2002-07-09 21:41 ` Christian Seberino
  2002-07-09 21:43 ` Christian Seberino
  0 siblings, 2 replies; 16+ messages in thread
From: j davis @ 2002-07-09 19:43 UTC (permalink / raw)
  To: netfilter


ipchains is not stateful so it doesnt need contrak...right?
jd

>From: Christian Seberino <seberino@spawar.navy.mil>
>To: Patrick Schaaf <bof@bof.de>
>CC: netfilter@lists.samba.org
>Subject: Re: how is this stuff getting thru default deny iptables 
>firewall?....
>Date: Tue, 9 Jul 2002 12:08:52 -0700
>MIME-Version: 1.0
>Received: from [198.186.203.85] by hotmail.com (3.2) with ESMTP id 
>MHotMailBEF485390058400431CEC6BACB5599E90; Tue, 09 Jul 2002 12:32:25 -0700
>Received: from va.samba.org (localhost [127.0.0.1])by lists.samba.org 
>(Postfix) with ESMTPid BD14F424A; Tue,  9 Jul 2002 12:32:11 -0700 (PDT)
>Received: from dt092n42.san.rr.com (dt092n42.san.rr.com [204.210.48.66])by 
>lists.samba.org (Postfix) with ESMTP id 8B4534A48for 
><netfilter@lists.samba.org>; Tue,  9 Jul 2002 12:07:26 -0700 (PDT)
>Received: from seberino by dt092n42.san.rr.com with local (Exim 3.32 #1)id 
>17S0M0-0006ST-00; Tue, 09 Jul 2002 12:08:52 -0700
From netfilter-admin@lists.samba.org Tue, 09 Jul 2002 12:33:44 -0700
>Delivered-To: netfilter@lists.samba.org
>Message-ID: <20020709120852.A24804@spawar.navy.mil>
>References: <20020622103055.B32585@spawar.navy.mil> 
><20020622173842.AGM19225.mta07-svc.ntlworld.com@there> 
><20020623001302.A949@spawar.navy.mil> <20020623095351.M5183@oknodo.bof.de> 
><20020627002144.B13910@spawar.navy.mil> 
><20020627093730.C1873@oknodo.bof.de>
>User-Agent: Mutt/1.2.5i
>In-Reply-To: <20020627093730.C1873@oknodo.bof.de>; from bof@bof.de on Thu, 
>Jun 27, 2002 at 09:37:30AM +0200
>Sender: netfilter-admin@lists.samba.org
>Errors-To: netfilter-admin@lists.samba.org
>X-BeenThere: netfilter@lists.samba.org
>X-Mailman-Version: 2.0.8
>Precedence: bulk
>List-Help: <mailto:netfilter-request@lists.samba.org?subject=help>
>List-Post: <mailto:netfilter@lists.samba.org>
>List-Subscribe: 
><http://lists.samba.org/listinfo/netfilter>,<mailto:netfilter-request@lists.samba.org?subject=subscribe>
>List-Id: netfilter user discussion list <netfilter.lists.samba.org>
>List-Unsubscribe: 
><http://lists.samba.org/listinfo/netfilter>,<mailto:netfilter-request@lists.samba.org?subject=unsubscribe>
>List-Archive: <http://lists.samba.org/pipermail/netfilter/>
>
> > On the other hand, if there is not yet a conntrack record in existence
> > for the packet, the nat PREROUTING table is consulted
>
>Patrick
>
>I appreciate all your help and after thinking about this on my vacation
>last week I think I got it now thanks to your feedback!
>Can I ask you few questions to verify I got what you said regarding
>how a private LAN can use DNS, HTTP, SMTP, etc. thru an SSH-only 
>firewall?...
>
>My main confusion I believe was that packets associated with preexisting
>conntracks are handled differently than packets *not* associated
>with a previous conntrack.
>
>Q1: The conntrack is the "memory" of netfilter that allows it to make
>decisions based on "history" of PC traffic right?
>
>Q2: Packets with a previous associated conntrack are handled *differently* 
>than ones
>without previous conntrack... and any attempt to try to understand
>behavior of firewall *without* this concept is doomed
>to confusion right?
>
>Q3: Is conntrack a new "iptables only" feature? I imagine ancient 
>ipchains/ipfwadmin
>would have had same issues and therefore would need something like
>"conntrack" to work correctly right?
>
>Sincerely,
>
>Chris
>--
>_______________________________________
>
>Dr. Christian Seberino
>SPAWAR Systems Center San Diego
>Code 2363
>53560 Hull Street
>San Diego, CA 92152-5001
>U.S.A.
>
>Phone: (619) 553-7940
>Fax:   (619) 553-2836
>Email: seberino@spawar.navy.mil
>_______________________________________
>


thanks,
jd

jd@taproot.bz
http://www.taproot.bz

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx



^ permalink raw reply	[flat|nested] 16+ messages in thread
* how is this stuff getting thru default deny iptables firewall?....
@ 2002-06-22 17:30 Christian Seberino
  2002-06-22 17:38 ` Antony Stone
  0 siblings, 1 reply; 16+ messages in thread
From: Christian Seberino @ 2002-06-22 17:30 UTC (permalink / raw)
  To: netfilter

My firewall *only* forwards SSH stuff to private LAN.

It forwards *everything* _from_ private LAN to Internet however.

How can the private LAN use DNS which it does????

How is DNS server returning the info thru firewall
if it *only* allows SSH??!?!?!?

Chris
-- 
_______________________________________

Dr. Christian Seberino
SPAWAR Systems Center San Diego
Code 2363
53560 Hull Street
San Diego, CA 92152-5001
U.S.A.

Phone: (619) 553-7940
Fax:   (619) 553-2836
Email: seberino@spawar.navy.mil
_______________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2002-07-10 16:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-22 21:43 how is this stuff getting thru default deny iptables firewall? James T. Moore
2002-06-23  7:13 ` Christian Seberino
  -- strict thread matches above, loose matches on Subject: below --
2002-07-09 19:43 j davis
2002-07-09 21:41 ` Christian Seberino
2002-07-09 21:43 ` Christian Seberino
     [not found]   ` <Pine.LNX.4.33.0207101903030.1723-100000@dodobirdy.nestac.com>
2002-07-10 16:34     ` Christian Seberino
2002-06-22 17:30 Christian Seberino
2002-06-22 17:38 ` Antony Stone
2002-06-23  7:13   ` Christian Seberino
2002-06-23  7:53     ` Patrick Schaaf
2002-06-27  7:21       ` Christian Seberino
2002-06-27  7:37         ` Patrick Schaaf
2002-07-09 19:08           ` Christian Seberino
2002-06-23  8:07     ` Antony Stone
2002-06-27  7:14       ` Christian Seberino
2002-06-27  7:28         ` Patrick Schaaf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox