Re: per-interface default routes?

2007-03-15 Thread dex

On 3/14/07, Alexandre Biancalana [EMAIL PROTECTED] wrote:

On 3/14/07, Wojciech Puchar [EMAIL PROTECTED] wrote:
 yes. but ipfw is most universal having all needed things at one place.
 firewalling, routing, shaping, etc.

PF too. is all at same place.


And pf has nat built-in, so it runs in kernel space.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


per-interface default routes?

2007-03-14 Thread Mark Messier

Suppose you have a freebsd box with two LAN interfaces,
one numbered on netA and one on netB...

Some applications are listening on the netA IP address, some on the
netB IP address.  Some applications may be listening on all interfaces
but might have a directive that indicates which IP address to use for
packets sourced from the application, like this:

query-source address 192.0.2.2 port 53;

What I want to happen is that packets sourced from the
netA IP address go out the netA physical interface
and packets sourced from the
netB IP address go out the netB physical interface.

That is, I want per-interface default routes
(is this the correct term?).

How do I do this?

Thanks,
-mark

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Wojciech Puchar

and packets sourced from the
netB IP address go out the netB physical interface.

That is, I want per-interface default routes
(is this the correct term?).

How do I do this?


using ipfw

rule example:

add xxx fwd router_for_a_link all from outgoing_address/range to any

please learn at least ipfw first if you didn't do already.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread youshi10

On Wed, 14 Mar 2007, Mark Messier wrote:


Suppose you have a freebsd box with two LAN interfaces,
one numbered on netA and one on netB...

Some applications are listening on the netA IP address, some on the
netB IP address.  Some applications may be listening on all interfaces
but might have a directive that indicates which IP address to use for
packets sourced from the application, like this:

query-source address 192.0.2.2 port 53;

What I want to happen is that packets sourced from the
netA IP address go out the netA physical interface
and packets sourced from the
netB IP address go out the netB physical interface.

That is, I want per-interface default routes
(is this the correct term?).

How do I do this?

Thanks,
-mark


Route has more information if you want to setup default routes for interfaces. 
Either that, or natd will yield a solution for you.

-Garrett

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Wojciech Puchar

That is, I want per-interface default routes
(is this the correct term?).

How do I do this?

Thanks,
-mark


Route has more information if you want to setup default routes for 
interfaces. Either that, or natd will yield a solution for you.


natd needs IPFW and is quite CPU consuming compared to just ipfw, which 
does very well what was asked for.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Mark Messier
 Route has more information if you want to setup default routes  
for interfaces.


I'm familiar with route(8)... but I don't see how that will work.
Can you expand on your comment?

I'm  likely to do the ipfw approach suggested by Wojceich,
as soon as I rebuild with options IPFIREWALL_FORWARD,

Thanks,
-mark

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Alexandre Biancalana

On 3/14/07, Mark Messier [EMAIL PROTECTED] wrote:


 Route has more information if you want to setup default routes
for interfaces.

I'm familiar with route(8)... but I don't see how that will work.
Can you expand on your comment?

I'm  likely to do the ipfw approach suggested by Wojceich,
as soon as I rebuild with options IPFIREWALL_FORWARD,



This could be done with pf  route-to too.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Wojciech Puchar

interfaces.


I'm familiar with route(8)... but I don't see how that will work.
Can you expand on your comment?

I'm  likely to do the ipfw approach suggested by Wojceich,
as soon as I rebuild with options IPFIREWALL_FORWARD,

exactly, sorry i forgot to mention about that option.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Wojciech Puchar

I'm  likely to do the ipfw approach suggested by Wojceich,
as soon as I rebuild with options IPFIREWALL_FORWARD,



This could be done with pf  route-to too.


yes. but ipfw is most universal having all needed things at one place.
firewalling, routing, shaping, etc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: per-interface default routes?

2007-03-14 Thread Alexandre Biancalana

On 3/14/07, Wojciech Puchar [EMAIL PROTECTED] wrote:


 I'm  likely to do the ipfw approach suggested by Wojceich,
 as soon as I rebuild with options IPFIREWALL_FORWARD,


 This could be done with pf  route-to too.

yes. but ipfw is most universal having all needed things at one place.
firewalling, routing, shaping, etc.




PF too. is all at same place.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]