From: Jason Opperisano <opie@817west.com>
To: netfilter@lists.netfilter.org
Subject: Re: Prevent traceroutes
Date: Thu, 19 May 2005 19:23:14 -0400 [thread overview]
Message-ID: <20050519232314.GA9369@bender.817west.com> (raw)
In-Reply-To: <fad9d484050519150730dbc53d@mail.gmail.com>
On Fri, May 20, 2005 at 12:07:11AM +0200, Kenneth Kalmer wrote:
> Guys
>
> How can I prevent users from doing a traceroute through my box using
> iptables? Better still, how can I route a traceroute through a
> different network than the default one?
this is not 100% infallible; as anyone running the traceroute can change
the defaults, but you need to block both the UDP method of tracerouting
and the ICMP method of tracerouting:
# standard UDP ports used by traceroute
iptables -A INPUT -p udp --dport 33434:33523 -j DROP
iptables -A FORWARD -p udp --dport 33434:33523 -j DROP
# ICMP echo-req's w/ low TTL
iptables -A INPUT -p icmp --icmp-type 8 -m ttl --ttl-lt 5 -j DROP
iptables -A FORWARD -p icmp --icmp-type 8 -m ttl --ttl-lt 5 -j DROP
the choice of 5 as the min TTL to match on is purely arbitrary...you may
be able to choose a better value for your specific topology.
-j
--
"Brian: Congratulations, Peter. You're the Spalding Gray of crap."
--Family Guy
next prev parent reply other threads:[~2005-05-19 23:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 22:07 Prevent traceroutes Kenneth Kalmer
2005-05-19 23:23 ` Jason Opperisano [this message]
2005-05-19 23:33 ` Jason Opperisano
2005-05-20 6:39 ` Taylor, Grant
2005-05-20 7:44 ` Taylor, Grant
2005-05-20 15:20 ` Jason Opperisano
2005-05-20 15:34 ` Taylor, Grant
2005-05-20 18:44 ` Charlie Brady
2005-05-20 19:03 ` Taylor, Grant
2005-05-20 19:37 ` Jason Opperisano
2005-05-23 7:01 ` Jozsef Kadlecsik
2005-05-20 8:01 ` Kenneth Kalmer
2005-05-20 1:12 ` Sertys
2005-05-20 19:17 ` Sebastian Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050519232314.GA9369@bender.817west.com \
--to=opie@817west.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox