Date: Fri, 11 Nov 2005 12:36:00 -0500 From: Charles Swiger <cswiger@mac.com> To: Perttu Laine <plaine@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: route how to? Message-ID: <12B737A6-96D1-4EA4-98AE-D222D24B3108@mac.com> In-Reply-To: <c6ef380c0511110915i57759494gb3bd1cab37a17396@mail.gmail.com> References: <c6ef380c0511110915i57759494gb3bd1cab37a17396@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 11, 2005, at 12:15 PM, Perttu Laine wrote: > I'd like to add route to my computer so one ip would be forwarded to > "/dev/null". So all other connections would work normally, but > connection to > for example 192.168.10.1 <http://192.168.10.1> would not work. How > can this > be done? And I propably need same for IPv6 too. I'd like to this > with route > instead of firewall 'cause this is temporary and kernel of that > computer > don't have pf enabled at the moment. It's better to use a firewall than routing to block traffic, but you want to use one of these flags: -reject RTF_REJECT - emit an ICMP unreachable when matched -blackhole RTF_BLACKHOLE - silently discard pkts (during updates) Something like: route add 192.168.10.1 localhost -reject > Oh. And if I add this route, how can delete it later? route delete 192.168.10.1 -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12B737A6-96D1-4EA4-98AE-D222D24B3108>