Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2012 18:01:15 +0300
From:      Michael Pounov <misho@elwix.org>
To:        freebsd-net@freebsd.org
Subject:   Re: Multiroute question
Message-ID:  <20120920180115.ede9a2b8.misho@elwix.org>
In-Reply-To: <505B2555.40704@doblej.net>
References:  <505B2555.40704@doblej.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Juan

Use pf like in that simple example:

$dsl_if = "CardA"
$int_if = "CardB"
$dsl_addr = "_dsl_if_ip_"
$int_addr = "_int_if_ip_"
$dsl_gw = "_dsl_gw_ip_"
$int_gw = "_int_gw_ip_"

set state-policy if-bound

.... blah blah blah whatever rules ...

pass out on $dsl_if route-to ($int_if $int_gw) from $int_if no state
pass out on $int_if route-to ($dsl_if $dsl_gw) from $dsl_if no state

# End pf example ;)

On Thu, 20 Sep 2012 16:16:53 +0200
Juan José Sánchez Mesa <juanjo.listas@doblej.net> wrote:

> Hi!
> 
> (sorry for my bad english)
> 
> I have a FreeBSD machine (8.2-RELEASE-p3). The machine has two ethernet 
> cards, configured in this way:
> 
> - Card A: internet IP address
> - Card B: intranet IP address
> 
> Default route goes via card A.
> 
> Now, on the intranet I have a "normal" DSL router. Then, using NAT i've 
> forewarded a simple port from the DSL to the intranet IP of this machine.
> 
> The incoming packets from the DSL comes ok to the machine (via card B), 
> but the outgoing packet goes to card A, due to the default route.
> 
> There is a way to configure the network so that outgoing packets goes to 
> the card from where the incoming packets was arrived ?
> 
> Or is this impossible to configure ?
> 
> Thanks!!!
> 
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


-- 
Best Regards, 

Michael Pounov
ELWIX - embedded lightweight unix -

WWW: http://www.elwix.org/
EMail: misho@elwix.org
Skype: mpunov
XMPP: misho@aitnet.org
Phone: +359 888 737358; +359 899 737358



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120920180115.ede9a2b8.misho>