All of lore.kernel.org
 help / color / mirror / Atom feed
* traceroute
@ 2004-06-30 13:05 Peter Marshall
  2004-06-30 13:29 ` traceroute Antony Stone
  2004-06-30 14:04 ` traceroute Ruprecht Helms
  0 siblings, 2 replies; 40+ messages in thread
From: Peter Marshall @ 2004-06-30 13:05 UTC (permalink / raw)
  To: netfilter

Hi.  I was wondering what I would need for rules to have traceroute work
through my firewall.  (I have a box behind the firewall trying to get out
using traceroute).

I have an allow established connections on my forwared chain, and I am
allowing anything from the source IP of the box in question to leave ... It
appears that the problem is on the packets comming back in .. but I am not
sure what I have to do to fix it ....

Thanks

Peter



^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-07-01  9:52 Piszcz, Justin Michael
  2004-07-01 12:25 ` traceroute Cedric Blancher
  0 siblings, 1 reply; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-07-01  9:52 UTC (permalink / raw)
  To: Cedric Blancher; +Cc: Jozsef Kadlecsik, netfilter

He was talking about pinging from behind his NAT, it has nothing to do with people pinging him, FYI.


-----Original Message-----
From: Cedric Blancher [mailto:blancher@cartel-securite.fr] 
Sent: Wednesday, June 30, 2004 4:51 PM
To: Piszcz, Justin Michael
Cc: Jozsef Kadlecsik; netfilter
Subject: RE: traceroute

Le mer 30/06/2004 à 17:21, Piszcz, Justin Michael a écrit :
> I do not know where you are getting your info from, but it is clearly
> incorrect.

From the source code, I guess, just like I did.

You have two type of ICMP handling. On one hand hand, you have
request/response ICMP stuff : echo, timestamp, netmask and info. Theses
messages are handled with state NEW for request and state ESTABLISHED
for answer. So an ICMP echo request has NEW state and related ICMP echo
reply is ESTABLISHED. A lonely ICMP echo reply is INVALID. On the other
hand, you have ICMP errors, that have RELATED state as long as kernel is
able to find to which conntrack entry they belong. Otherwise, they're
INVALID.

So, if you don't allow ICMP with NEW state in INPUT chain, then no one
will be able to ping you.

See /usr/src/linux/net/ipv4/netfilter/ip_conntrack_proto_icmp.c file.

So you're simply wrong.

> I do not allow any ICMP explicitly and I have never had a problem
> using NAT or similar.

And if you're able to ping anyway, it means you have a rule that
implicitly accepts thoses packets, and then should read your ruleset
again.


-- 
http://www.netexit.com/~sid/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!


^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 18:20 Piszcz, Justin Michael
  2004-06-30 20:55 ` traceroute Cedric Blancher
  2004-07-01  8:19 ` traceroute Jozsef Kadlecsik
  0 siblings, 2 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 18:20 UTC (permalink / raw)
  To: Jozsef Kadlecsik; +Cc: netfilter

If the output chain POLICY is set to ACCEPT; there is no need to setup
rules for it.


-----Original Message-----
From: Jozsef Kadlecsik [mailto:kadlec@blackhole.kfki.hu] 
Sent: Wednesday, June 30, 2004 2:18 PM
To: Piszcz, Justin Michael
Cc: netfilter
Subject: RE: traceroute

On Wed, 30 Jun 2004, Piszcz, Justin Michael wrote:

> I use -I INPUT ESTABLISHED,RELATED.
>
> I can ping outbound just fine, ESTABLISHED,RELATED keeps track of the
> ICMPs.

You could not ping outbound without setting up proper rules in the
OUTPUT
chain. Your machine cannot be pinged with the rules above alone. Your
rule
above does not let through ping responses on a firewall. In other words
it
does not allow ICMP in general.

> I do not know where you are getting your info from, but it is clearly
> incorrect.

You yourself claimed that:

> > You do not have to allow it explicitly (ie: allow icmp so other
> > machines can ping your machine).

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary



^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 16:28 Piszcz, Justin Michael
  2004-06-30 16:47 ` traceroute Antony Stone
  0 siblings, 1 reply; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 16:28 UTC (permalink / raw)
  To: netfilter

I was not aware he had a DMZ.

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 12:22 PM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 5:10 pm, Piszcz, Justin Michael wrote:

> Yes, that is why I recommended to him to set the INPUT to
> ESTABLISHED,RELATED, which may help to solve his problem, as well as
> setting the policy (FORWARD) to ACCEPT until he can find out what
> exactly is causing his problem(s).

What's the purpose of making any changes to the INPUT chain when the
packets 
are being routed through the firewall to somewhere else?

I could just about understand if you were ensuring that his OUTPUT chain

allowed the ICMP TTL Exceeded packets to leave the firewall for that 
particular hop, but I don't see where INPUT comes into it at all?

Regards,

Antony.

> -----Original Message-----
> From: netfilter-admin@lists.netfilter.org
> [mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
> Sent: Wednesday, June 30, 2004 11:33 AM
> To: netfilter
> Subject: Re: traceroute
>
> On Wednesday 30 June 2004 4:10 pm, Piszcz, Justin Michael wrote:
> > ICMP is "allowed" when you -I INPUT ESTABLISHED,RELATED.
> >
> > You do not have to allow it explicitly (ie: allow icmp so other
>
> machines
>
> > can ping your machine).
>
> Please look at the rules which are being used:
>
> $IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
> $IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT
>
> They are explicitly accepting TCP and UDP only.   ICMP will not be
> matched by
> the above rules.
>
> Regards,
>
> Antony.
>
> > -----Original Message-----
> > From: netfilter-admin@lists.netfilter.org
> > [mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony
Stone
> > Sent: Wednesday, June 30, 2004 10:58 AM
> > To: netfilter
> > Subject: Re: traceroute
> >
> > On Wednesday 30 June 2004 3:34 pm, Piszcz, Justin Michael wrote:
> > > -----Original Message-----
> > > From: Peter Marshall [mailto:peter.marshall@caris.com]
> > > Sent: Wednesday, June 30, 2004 10:25 AM
> > > To: Piszcz, Justin Michael; netfilter
> > > Subject: Re: traceroute
> > >
> > > I don't get anything (except the name lookup) from traceroute.
> > >
> > > Below are the relavant rules .... tracert is the ip of the box I
am
> > > trying to traceroute form.
> > > The Ip of that box is an internet routable ip addess.
> > >
> > > $IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j
>
> ACCEPT
>
> > > $IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j
>
> ACCEPT
>
> > > $IPT -A FORWARD -s <tracert box> -o eth1 -j rh-net
> > > $IPT -A FORWARD -d <tracert box -i eth1 -j net-rh
> > >
> > > $IPT -A rh-net -s <tracert box> -j ACCEPT
> > > $IPT -A net-rh -p UDP -m state --state ESTABLISHED,RELATED -j
ACCEPT
> >
> > You should allow ICMP packets through your system.
> >
> > You should certainly allow ICMP through if you want traceroute to
>
> work,
>
> > and
> > you should generally allow ICMP if you want many other things to
work.
> > If
> > you want to block certain types of ICMP, that's fine (many people
do),
> > but
> > don't block all ICMP.
> >
> > Traceroute works by sending either ICMP "ping" (echo request)
packets,
> > or UDP
> > packets to high port numbers (which are assumed not to be
listening),
> > depending on the Operating System of the client doing the
traceroute.
> > In
> > both cases the important response is an ICMP TTL exceeded packet,
>
> which
>
> > contains the IP address of the router where TTL became == 0.
> >
> > Remember that firewalling can be a dangerous topic - if you block
>
> things
>
> > you
> > don't understand, and therefore don't know that you should allow,
some
> > things
> > will break.
> >
> > Regards,
> >
> > Antony.

-- 
The first fifty percent of an engineering project takes ninety percent
of the 
time, and the remaining fifty percent takes another ninety percent of
the 
time.

                                                     Please reply to the
list;
                                                           please don't
CC me.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 16:10 Piszcz, Justin Michael
  2004-06-30 16:21 ` traceroute Antony Stone
  2004-06-30 16:25 ` traceroute Peter Marshall
  0 siblings, 2 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 16:10 UTC (permalink / raw)
  To: netfilter

Yes, that is why I recommended to him to set the INPUT to
ESTABLISHED,RELATED, which may help to solve his problem, as well as
setting the policy (FORWARD) to ACCEPT until he can find out what
exactly is causing his problem(s).



-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 11:33 AM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 4:10 pm, Piszcz, Justin Michael wrote:

> ICMP is "allowed" when you -I INPUT ESTABLISHED,RELATED.
>
> You do not have to allow it explicitly (ie: allow icmp so other
machines
> can ping your machine).

Please look at the rules which are being used:

$IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT

They are explicitly accepting TCP and UDP only.   ICMP will not be
matched by 
the above rules.

Regards,

Antony.

> -----Original Message-----
> From: netfilter-admin@lists.netfilter.org
> [mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
> Sent: Wednesday, June 30, 2004 10:58 AM
> To: netfilter
> Subject: Re: traceroute
>
> On Wednesday 30 June 2004 3:34 pm, Piszcz, Justin Michael wrote:
> > -----Original Message-----
> > From: Peter Marshall [mailto:peter.marshall@caris.com]
> > Sent: Wednesday, June 30, 2004 10:25 AM
> > To: Piszcz, Justin Michael; netfilter
> > Subject: Re: traceroute
> >
> > I don't get anything (except the name lookup) from traceroute.
> >
> > Below are the relavant rules .... tracert is the ip of the box I am
> > trying to traceroute form.
> > The Ip of that box is an internet routable ip addess.
> >
> > $IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j
ACCEPT
> > $IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j
ACCEPT
> >
> > $IPT -A FORWARD -s <tracert box> -o eth1 -j rh-net
> > $IPT -A FORWARD -d <tracert box -i eth1 -j net-rh
> >
> > $IPT -A rh-net -s <tracert box> -j ACCEPT
> > $IPT -A net-rh -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT
>
> You should allow ICMP packets through your system.
>
> You should certainly allow ICMP through if you want traceroute to
work,
> and
> you should generally allow ICMP if you want many other things to work.
> If
> you want to block certain types of ICMP, that's fine (many people do),
> but
> don't block all ICMP.
>
> Traceroute works by sending either ICMP "ping" (echo request) packets,
> or UDP
> packets to high port numbers (which are assumed not to be listening),
> depending on the Operating System of the client doing the traceroute.
> In
> both cases the important response is an ICMP TTL exceeded packet,
which
> contains the IP address of the router where TTL became == 0.
>
> Remember that firewalling can be a dangerous topic - if you block
things
> you
> don't understand, and therefore don't know that you should allow, some
> things
> will break.
>
> Regards,
>
> Antony.

-- 
This is not a rehearsal.
This is Real Life.

                                                     Please reply to the
list;
                                                           please don't
CC me.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 15:21 Piszcz, Justin Michael
  2004-06-30 18:17 ` traceroute Jozsef Kadlecsik
  2004-06-30 20:51 ` traceroute Cedric Blancher
  0 siblings, 2 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 15:21 UTC (permalink / raw)
  To: Jozsef Kadlecsik; +Cc: netfilter

I use -I INPUT ESTABLISHED,RELATED.

I can ping outbound just fine, ESTABLISHED,RELATED keeps track of the
ICMPs.

Here:

$ ping yahoo.com
PING yahoo.com (216.109.127.28) 56(84) bytes of data.
64 bytes from w1.rc.dcn.yahoo.com (216.109.127.28): icmp_seq=1 ttl=54
time=114 ms
--- yahoo.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 114.523/114.523/114.523/0.000 ms
$

I do not allow any ICMP explicitly and I have never had a problem using
NAT or similar.

I do not know where you are getting your info from, but it is clearly
incorrect.

-----Original Message-----
From: Jozsef Kadlecsik [mailto:kadlec@blackhole.kfki.hu] 
Sent: Wednesday, June 30, 2004 11:19 AM
To: Piszcz, Justin Michael
Cc: netfilter
Subject: RE: traceroute

On Wed, 30 Jun 2004, Piszcz, Justin Michael wrote:

> ICMP is "allowed" when you -I INPUT ESTABLISHED,RELATED.

That's false.

> You do not have to allow it explicitly (ie: allow icmp so other
machines
> can ping your machine).

That's false, again.

Read the documentation and do not spread false info.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary



^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 15:10 Piszcz, Justin Michael
  2004-06-30 15:19 ` traceroute Jozsef Kadlecsik
  2004-06-30 15:33 ` traceroute Antony Stone
  0 siblings, 2 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 15:10 UTC (permalink / raw)
  To: netfilter

ICMP is "allowed" when you -I INPUT ESTABLISHED,RELATED.

You do not have to allow it explicitly (ie: allow icmp so other machines
can ping your machine).

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 10:58 AM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 3:34 pm, Piszcz, Justin Michael wrote:

> -----Original Message-----
> From: Peter Marshall [mailto:peter.marshall@caris.com]
> Sent: Wednesday, June 30, 2004 10:25 AM
> To: Piszcz, Justin Michael; netfilter
> Subject: Re: traceroute
>
> I don't get anything (except the name lookup) from traceroute.
>
> Below are the relavant rules .... tracert is the ip of the box I am
> trying to traceroute form.
> The Ip of that box is an internet routable ip addess.
>
> $IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
> $IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT
>
> $IPT -A FORWARD -s <tracert box> -o eth1 -j rh-net
> $IPT -A FORWARD -d <tracert box -i eth1 -j net-rh
>
> $IPT -A rh-net -s <tracert box> -j ACCEPT
> $IPT -A net-rh -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT

You should allow ICMP packets through your system.

You should certainly allow ICMP through if you want traceroute to work,
and 
you should generally allow ICMP if you want many other things to work.
If 
you want to block certain types of ICMP, that's fine (many people do),
but 
don't block all ICMP.

Traceroute works by sending either ICMP "ping" (echo request) packets,
or UDP 
packets to high port numbers (which are assumed not to be listening), 
depending on the Operating System of the client doing the traceroute.
In 
both cases the important response is an ICMP TTL exceeded packet, which 
contains the IP address of the router where TTL became == 0.

Remember that firewalling can be a dangerous topic - if you block things
you 
don't understand, and therefore don't know that you should allow, some
things 
will break.

Regards,

Antony.

-- 
Anything that improbable is effectively impossible.

 - Murray Gell-Mann, Nobel Prizewinner in Physics

                                                     Please reply to the
list;
                                                           please don't
CC me.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 14:52 Piszcz, Justin Michael
  0 siblings, 0 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 14:52 UTC (permalink / raw)
  To: Peter Marshall, netfilter

Hrm, perhaps..

Maybe showing a diagram of your network might help?

It sounds like you have two firewalls then?
If so, I still believe you would be using INPUT.., have you tried it,
default POLICY for FORWARD to ACCEPT and enable the INPUT rule?

Traceroute:

[yourbox (iptables firewall)] ---------> [nat+firewall] -------> host?

-----Original Message-----
From: Peter Marshall [mailto:peter.marshall@caris.com] 
Sent: Wednesday, June 30, 2004 10:50 AM
To: Piszcz, Justin Michael; netfilter
Subject: Re: traceroute

Why would I use the INPUT chain .. I am doing a trace route from an
internal
box to an internet box ... on the other side of my firewall ... I am
pretty
sure that is a forwared rule ... is it not ?

Peter

----- Original Message ----- 
From: "Piszcz, Justin Michael" <justin.piszcz@mitretek.org>
To: "Peter Marshall" <peter.marshall@caris.com>; "netfilter"
<netfilter@lists.netfilter.org>
Sent: Wednesday, June 30, 2004 11:34 AM
Subject: RE: traceroute


Is there a reason why you are doing stuff with the FORWARD chain?
Have you tried enabling ACCEPT for the FORWARD chain and seeing if it
works?

Generally, with the FORWARD chain, over all other chains you need to be
careful on how you use it. If used improperly, you could screw a lot of
things up on the network.

I would recommend trying it without any forward options.
Ie: iptables -P FORWARD ACCEPT

You need the ESTABLISHED,RELATED option for the INPUT chain.

# STEP 9 - ALLOW IN WHAT WE SEND OUT
####################################### $IPTABLES -A INPUT -m state
--state ESTABLISHED,RELATED -j ACCEPT

-----Original Message-----
From: Peter Marshall [mailto:peter.marshall@caris.com]
Sent: Wednesday, June 30, 2004 10:25 AM
To: Piszcz, Justin Michael; netfilter
Subject: Re: traceroute

I don't get anything (except the name lookup) from traceroute.

When I run a packet sniffer, I see the following (when doing a
traceroute on
www.google.com)

source     destination                 Proto
me           216.239.41.99          UDP            sourceport 1059
destination port 33435
3com       3com                         ARP            who has
<gatewayip>
tell <my ip>
3com        3com                        ARP            <gateway ip> is
at
<mac address>
me           216.239.41.99           UDP          soutceport: 1059
Destination port 33437
......

traceroute to www.google.akadns.net (216.239.39.147), 30 hops max, 38
byte
packets
 1  * * *
 2  * * *

Below are the relavant rules .... tracert is the ip of the box I am
trying
to traceroute form.
The Ip of that box is an internet routable ip addess.

$IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT

$IPT -A FORWARD -s <tracert box> -o eth1 -j rh-net
$IPT -A FORWARD -d <tracert box -i eth1 -j net-rh

$IPT -A rh-net -s <tracert box> -j ACCEPT
$IPT -A net-rh -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT


Thank you again,
Peter.

----- Original Message ----- 
From: "Piszcz, Justin Michael" <justin.piszcz@mitretek.org>
To: "netfilter" <netfilter@lists.netfilter.org>
Sent: Wednesday, June 30, 2004 10:47 AM
Subject: RE: traceroute


Can you show me your firewall?
Can you paste the blocks you are seeing?
It does not get past the 1st hop, or?
Post an example traceroute?


-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 9:29 AM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 2:05 pm, Peter Marshall wrote:

> Hi.  I was wondering what I would need for rules to have traceroute
work
> through my firewall.  (I have a box behind the firewall trying to get
out
> using traceroute).
>
> I have an allow established connections on my forwared chain, and I am
> allowing anything from the source IP of the box in question to leave
... It
> appears that the problem is on the packets comming back in .. but I am
not
> sure what I have to do to fix it ....

Allow RELATED packets as well as ESTABLISHED.

Regards,

Antony.

-- 
"It is easy to be blinded to the essential uselessness of them by the
sense of
achievement you get from getting them to work at all. In other words -
and
this is the rock solid principle on which the whole of the Corporation's

Galaxy-wide success is founded - their fundamental design flaws are
completely hidden by their superficial design flaws."

 - Douglas Noel Adams

                                                     Please reply to the
list;
                                                           please don't
CC me.







^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 14:36 Piszcz, Justin Michael
  0 siblings, 0 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 14:36 UTC (permalink / raw)
  To: Ruprecht Helms, Peter Marshall; +Cc: netfilter

The default UNIX traceroute uses UDP sockets, port > 30,000+.

ICMP would not help him here, unless he is using (mtr) which uses ICMP.

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Ruprecht Helms
Sent: Wednesday, June 30, 2004 10:04 AM
To: Peter Marshall
Cc: netfilter
Subject: Re: traceroute

Peter Marshall wrote:

>Hi.  I was wondering what I would need for rules to have traceroute
work
>through my firewall.  (I have a box behind the firewall trying to get
out
>using traceroute).
>
>Have a look to the icmp-types. You can begin by enabling icmp
generally.
>  
>
Regards,
Ruprecht





^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 14:34 Piszcz, Justin Michael
  2004-06-30 14:50 ` traceroute Peter Marshall
  2004-06-30 14:57 ` traceroute Antony Stone
  0 siblings, 2 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 14:34 UTC (permalink / raw)
  To: Peter Marshall, netfilter

Is there a reason why you are doing stuff with the FORWARD chain?
Have you tried enabling ACCEPT for the FORWARD chain and seeing if it
works?

Generally, with the FORWARD chain, over all other chains you need to be
careful on how you use it. If used improperly, you could screw a lot of
things up on the network.

I would recommend trying it without any forward options.
Ie: iptables -P FORWARD ACCEPT

You need the ESTABLISHED,RELATED option for the INPUT chain.

# STEP 9 - ALLOW IN WHAT WE SEND OUT
####################################### $IPTABLES -A INPUT -m state
--state ESTABLISHED,RELATED -j ACCEPT

-----Original Message-----
From: Peter Marshall [mailto:peter.marshall@caris.com] 
Sent: Wednesday, June 30, 2004 10:25 AM
To: Piszcz, Justin Michael; netfilter
Subject: Re: traceroute

I don't get anything (except the name lookup) from traceroute.

When I run a packet sniffer, I see the following (when doing a
traceroute on
www.google.com)

source     destination                 Proto
me           216.239.41.99          UDP            sourceport 1059
destination port 33435
3com       3com                         ARP            who has
<gatewayip>
tell <my ip>
3com        3com                        ARP            <gateway ip> is
at
<mac address>
me           216.239.41.99           UDP          soutceport: 1059
Destination port 33437
......

traceroute to www.google.akadns.net (216.239.39.147), 30 hops max, 38
byte
packets
 1  * * *
 2  * * *

Below are the relavant rules .... tracert is the ip of the box I am
trying
to traceroute form.
The Ip of that box is an internet routable ip addess.

$IPT -A FORWARD -p TCP -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT

$IPT -A FORWARD -s <tracert box> -o eth1 -j rh-net
$IPT -A FORWARD -d <tracert box -i eth1 -j net-rh

$IPT -A rh-net -s <tracert box> -j ACCEPT
$IPT -A net-rh -p UDP -m state --state ESTABLISHED,RELATED -j ACCEPT


Thank you again,
Peter.

----- Original Message ----- 
From: "Piszcz, Justin Michael" <justin.piszcz@mitretek.org>
To: "netfilter" <netfilter@lists.netfilter.org>
Sent: Wednesday, June 30, 2004 10:47 AM
Subject: RE: traceroute


Can you show me your firewall?
Can you paste the blocks you are seeing?
It does not get past the 1st hop, or?
Post an example traceroute?


-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 9:29 AM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 2:05 pm, Peter Marshall wrote:

> Hi.  I was wondering what I would need for rules to have traceroute
work
> through my firewall.  (I have a box behind the firewall trying to get
out
> using traceroute).
>
> I have an allow established connections on my forwared chain, and I am
> allowing anything from the source IP of the box in question to leave
... It
> appears that the problem is on the packets comming back in .. but I am
not
> sure what I have to do to fix it ....

Allow RELATED packets as well as ESTABLISHED.

Regards,

Antony.

-- 
"It is easy to be blinded to the essential uselessness of them by the
sense of
achievement you get from getting them to work at all. In other words -
and
this is the rock solid principle on which the whole of the Corporation's

Galaxy-wide success is founded - their fundamental design flaws are
completely hidden by their superficial design flaws."

 - Douglas Noel Adams

                                                     Please reply to the
list;
                                                           please don't
CC me.






^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 13:47 Piszcz, Justin Michael
  2004-06-30 14:25 ` traceroute Peter Marshall
  0 siblings, 1 reply; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 13:47 UTC (permalink / raw)
  To: netfilter

Can you show me your firewall?
Can you paste the blocks you are seeing?
It does not get past the 1st hop, or?
Post an example traceroute?


-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Wednesday, June 30, 2004 9:29 AM
To: netfilter
Subject: Re: traceroute

On Wednesday 30 June 2004 2:05 pm, Peter Marshall wrote:

> Hi.  I was wondering what I would need for rules to have traceroute
work
> through my firewall.  (I have a box behind the firewall trying to get
out
> using traceroute).
>
> I have an allow established connections on my forwared chain, and I am
> allowing anything from the source IP of the box in question to leave
... It
> appears that the problem is on the packets comming back in .. but I am
not
> sure what I have to do to fix it ....

Allow RELATED packets as well as ESTABLISHED.

Regards,

Antony.

-- 
"It is easy to be blinded to the essential uselessness of them by the
sense of 
achievement you get from getting them to work at all. In other words -
and 
this is the rock solid principle on which the whole of the Corporation's

Galaxy-wide success is founded - their fundamental design flaws are 
completely hidden by their superficial design flaws."

 - Douglas Noel Adams

                                                     Please reply to the
list;
                                                           please don't
CC me.




^ permalink raw reply	[flat|nested] 40+ messages in thread
* RE: traceroute
@ 2004-06-30 13:33 Piszcz, Justin Michael
  0 siblings, 0 replies; 40+ messages in thread
From: Piszcz, Justin Michael @ 2004-06-30 13:33 UTC (permalink / raw)
  To: Peter Marshall, netfilter

You need to set up the ESTABLISHED,RELATED rule.

Here is an example of a test firewall:
http://installkernel.tripod.com/ipls



-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Peter Marshall
Sent: Wednesday, June 30, 2004 9:06 AM
To: netfilter
Subject: traceroute

Hi.  I was wondering what I would need for rules to have traceroute work
through my firewall.  (I have a box behind the firewall trying to get
out
using traceroute).

I have an allow established connections on my forwared chain, and I am
allowing anything from the source IP of the box in question to leave ...
It
appears that the problem is on the packets comming back in .. but I am
not
sure what I have to do to fix it ....

Thanks

Peter




^ permalink raw reply	[flat|nested] 40+ messages in thread
* traceroute
@ 2004-06-13 13:55 Prash
  2004-06-13 14:53 ` traceroute Cedric Blancher
  0 siblings, 1 reply; 40+ messages in thread
From: Prash @ 2004-06-13 13:55 UTC (permalink / raw)
  To: netfilter

Hi Peeps,

A weird problem. See my rules below on the INPUT chain. I have NOT
allowed 33434:33523 for traceroute on UDP but some people can and some
people can't do a traceroute. Any ideas? Traceroute should be accepted
only if I open 33434:33523 .. isn't it? Then why is it allowing some in.

I'm allowing everything on FORWARD and OUTPUT chain.

Also for DNS and Web, do I need to open any specific >1024 ports. That
should be covered by ESTABLISHED, RELATED .. isn't it?


#Accept ESTABLISHED
-A RH-Lokkit-0-50-INPUT -p tcp -m state --state ESTABLISHED,RELATED -j
ACCEPT
-A RH-Lokkit-0-50-INPUT -p udp -m state --state ESTABLISHED,RELATED
--dport 1024: -j ACCEPT

#Allow traceroute
###-A RH-Lokkit-0-50-INPUT -p udp --dport 33434:33523 -j ACCEPT

#Accept ICMP Ping
-A RH-Lokkit-0-50-INPUT -p icmp --icmp-type echo-request -m limit
--limit 5/second -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p icmp -j LOG

# Drop Everything else
-A RH-Lokkit-0-50-INPUT -j DROP



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

end of thread, other threads:[~2004-07-01 12:25 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-30 13:05 traceroute Peter Marshall
2004-06-30 13:29 ` traceroute Antony Stone
2004-06-30 21:47   ` traceroute Florian Boelstler
2004-06-30 21:52     ` traceroute Antony Stone
2004-06-30 22:36       ` traceroute Florian Boelstler
2004-06-30 22:39         ` traceroute Antony Stone
2004-06-30 23:06           ` traceroute Florian Boelstler
2004-07-01  9:21           ` traceroute Jozsef Kadlecsik
2004-07-01  9:30             ` traceroute Antony Stone
2004-07-01 10:27               ` traceroute Jozsef Kadlecsik
2004-07-01 12:15             ` traceroute Cedric Blancher
2004-07-01  0:16     ` traceroute Cedric Blancher
2004-06-30 14:04 ` traceroute Ruprecht Helms
  -- strict thread matches above, loose matches on Subject: below --
2004-07-01  9:52 traceroute Piszcz, Justin Michael
2004-07-01 12:25 ` traceroute Cedric Blancher
2004-06-30 18:20 traceroute Piszcz, Justin Michael
2004-06-30 20:55 ` traceroute Cedric Blancher
2004-07-01  8:19 ` traceroute Jozsef Kadlecsik
2004-06-30 16:28 traceroute Piszcz, Justin Michael
2004-06-30 16:47 ` traceroute Antony Stone
2004-06-30 16:10 traceroute Piszcz, Justin Michael
2004-06-30 16:21 ` traceroute Antony Stone
2004-06-30 16:25 ` traceroute Peter Marshall
2004-06-30 17:00   ` traceroute Antony Stone
2004-06-30 15:21 traceroute Piszcz, Justin Michael
2004-06-30 18:17 ` traceroute Jozsef Kadlecsik
2004-06-30 20:51 ` traceroute Cedric Blancher
2004-06-30 15:10 traceroute Piszcz, Justin Michael
2004-06-30 15:19 ` traceroute Jozsef Kadlecsik
2004-06-30 15:33 ` traceroute Antony Stone
2004-06-30 14:52 traceroute Piszcz, Justin Michael
2004-06-30 14:36 traceroute Piszcz, Justin Michael
2004-06-30 14:34 traceroute Piszcz, Justin Michael
2004-06-30 14:50 ` traceroute Peter Marshall
2004-06-30 14:57 ` traceroute Antony Stone
2004-06-30 13:47 traceroute Piszcz, Justin Michael
2004-06-30 14:25 ` traceroute Peter Marshall
2004-06-30 13:33 traceroute Piszcz, Justin Michael
2004-06-13 13:55 traceroute Prash
2004-06-13 14:53 ` traceroute Cedric Blancher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.