All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Is "no route to host" fake possible?
Date: Fri, 25 Jun 2004 12:19:41 +0100	[thread overview]
Message-ID: <200406251219.41335.Antony@Soft-Solutions.co.uk> (raw)
In-Reply-To: <00c601c45aa1$74751080$3b7819c4@PHAKE>

On Friday 25 June 2004 11:44 am, Cilliè Burger wrote:

> >Hello,
> >
> >I know the rules REJECT, DENY or DROP, but is it possible to return to
> >the client the error message "no route to host" ?
> >
> >I saw that it's possible to configure this on CISCO routers, and I would
> >lke to know it it's possible?

> yes, it is
>
> # man route
>
> reject      install a blocking route, which will force a  route
>               lookup  to  fail.  This is for example used to mask
>               out networks before using the default route.   This
>               is NOT for firewalling.
>
> route add -host 192.168.1.2 reject
>
> # ping 192.168.1.2
> connect: Network is unreachable
>
> for more info check the route man page

This is fine, so long as you want to return this message for *all* packets 
addressed to the host.   Doing it with netfilter has the advantage that you 
can specify selected sources for this reject to be returned to.

The target:
-j REJECT --reject-with icmp-net-unreachable

should result in the same response as shown above.

Regards,

Antony.

-- 
GIT/E d- s+:--(-) a+ C++++$(---) UL++++$ P+(---)>++ L+++(++++)$ !E W(-) N(-) 
o? w--(---) O !M V+++(--) !PS !PE Y+ PGP+> t- !tv@ b+++ DI++ D--- e+++(*) h++ 
5? !X- !R K--? G-

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



  reply	other threads:[~2004-06-25 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-25 10:44 RE:Is "no route to host" fake possible? Cilliè Burger
2004-06-25 11:19 ` Antony Stone [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-06-25  8:53 Is " iptables-ml
2004-06-25  9:15 ` Antony Stone
2004-06-25  9:24 ` Patrick Leslie Polzer

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=200406251219.41335.Antony@Soft-Solutions.co.uk \
    --to=antony@soft-solutions.co.uk \
    --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 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.