* Force traffic
@ 2010-06-13 17:22 Jonathan Tripathy
2010-06-13 18:15 ` Jan Engelhardt
2010-06-14 13:17 ` Federico Alberto Sayd
0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Tripathy @ 2010-06-13 17:22 UTC (permalink / raw)
To: netfilter
Hi Everyone,
Does anyone know any rules that I could use (using iptable, ebtables, or
otherwise) that could force all traffic coming from an interface to go
out via a particular interface? I'm using Xen and all the DomUs ("VMs"
or "Guests") are connected to a linux bridge. I wish to force all
traffic from these VMs to go out via the interface which is connected to
my firewall (which itself is a filtering bridge). I wish to do this all
at the "link-layer" if possible.
I am lead to believe that in a linux bridge, all frames are sent to all
ports (a bit like the old-school hubs), so it could just be a matter of
blocking all traffic, except those which are for the firewall interface,
using ebtables.
Any help is very much appreciated.
Thanks
Jonathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force traffic
2010-06-13 17:22 Force traffic Jonathan Tripathy
@ 2010-06-13 18:15 ` Jan Engelhardt
2010-06-13 18:17 ` Jonathan Tripathy
2010-06-14 13:17 ` Federico Alberto Sayd
1 sibling, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-06-13 18:15 UTC (permalink / raw)
To: Jonathan Tripathy; +Cc: netfilter
On Sunday 2010-06-13 19:22, Jonathan Tripathy wrote:
>Hi Everyone,
>
>Does anyone know any rules that I could use (using iptable, ebtables,
>or otherwise) that could force all traffic coming from an interface to
>go out via a particular interface?
For link/ether, you have to specify a target to send to. Just interface
won't cut it.
>I am lead to believe that in a linux bridge, all frames are sent to all
>ports (a bit like the old-school hubs), so it could just be a matter of
>blocking all traffic, except those which are for the firewall
>interface, using ebtables.
btw, a bridge/switch is not a hub/electrical repeater by its very definition.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force traffic
2010-06-13 18:15 ` Jan Engelhardt
@ 2010-06-13 18:17 ` Jonathan Tripathy
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Tripathy @ 2010-06-13 18:17 UTC (permalink / raw)
To: Jan Engelhardt, netfilter
On 13/06/10 19:15, Jan Engelhardt wrote:
> On Sunday 2010-06-13 19:22, Jonathan Tripathy wrote:
>
>
>> Hi Everyone,
>>
>> Does anyone know any rules that I could use (using iptable, ebtables,
>> or otherwise) that could force all traffic coming from an interface to
>> go out via a particular interface?
>>
> For link/ether, you have to specify a target to send to. Just interface
> won't cut it.
>
>
>> I am lead to believe that in a linux bridge, all frames are sent to all
>> ports (a bit like the old-school hubs), so it could just be a matter of
>> blocking all traffic, except those which are for the firewall
>> interface, using ebtables.
>>
> btw, a bridge/switch is not a hub/electrical repeater by its very definition.
>
Is there any way to do what I want to achieve with ebtables then?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force traffic
2010-06-13 17:22 Force traffic Jonathan Tripathy
2010-06-13 18:15 ` Jan Engelhardt
@ 2010-06-14 13:17 ` Federico Alberto Sayd
2010-06-14 19:51 ` Narendra Choyal
1 sibling, 1 reply; 6+ messages in thread
From: Federico Alberto Sayd @ 2010-06-14 13:17 UTC (permalink / raw)
To: netfilter
El 13/06/10 14:22, Jonathan Tripathy escribió:
> Hi Everyone,
>
> Does anyone know any rules that I could use (using iptable, ebtables,
> or otherwise) that could force all traffic coming from an interface to
> go out via a particular interface? I'm using Xen and all the DomUs
> ("VMs" or "Guests") are connected to a linux bridge. I wish to force
> all traffic from these VMs to go out via the interface which is
> connected to my firewall (which itself is a filtering bridge). I wish
> to do this all at the "link-layer" if possible.
>
> I am lead to believe that in a linux bridge, all frames are sent to
> all ports (a bit like the old-school hubs), so it could just be a
> matter of blocking all traffic, except those which are for the
> firewall interface, using ebtables.
>
> Any help is very much appreciated.
>
> Thanks
>
> Jonathan
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
From iptables man:
physdev
This module matches on the bridge port input and output
devices enslaved to a bridge device. This module is a part of the
infrastructure that enables a transparent bridging IP firewall and
is only useful for kernel versions above version 2.5.44.
!] --physdev-is-out
Matches if the packet will leave through a bridge interface.
May be this module can be useful for you
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force traffic
2010-06-14 13:17 ` Federico Alberto Sayd
@ 2010-06-14 19:51 ` Narendra Choyal
2010-06-14 20:15 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Narendra Choyal @ 2010-06-14 19:51 UTC (permalink / raw)
To: Federico Alberto Sayd; +Cc: netfilter
What type of virtualization you are using --
• Para virtualization
• Fully virtualization
Different virtualization differs for your answer.
Sol 1.
====
You have to apply NATting that will route all routes to a specific
interface(or ip of interface)
Sol 2.
====
Use "route" command
and for more detail contact me
Narendra Choyal
narendrachoyal@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Force traffic
2010-06-14 19:51 ` Narendra Choyal
@ 2010-06-14 20:15 ` Jan Engelhardt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2010-06-14 20:15 UTC (permalink / raw)
To: Narendra Choyal; +Cc: Federico Alberto Sayd, netfilter
On Monday 2010-06-14 21:51, Narendra Choyal wrote:
>What type of virtualization you are using --
> • Para virtualization
> • Fully virtualization
>
>Different virtualization differs for your answer.
>
>Sol 1.
>====
>You have to apply NATting that will route all routes to a specific
>interface(or ip of interface)
NAT does not route traffic, it rewrites it.
>Sol 2.
>====
>Use "route" command
Use "ip route" only.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-06-14 20:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 17:22 Force traffic Jonathan Tripathy
2010-06-13 18:15 ` Jan Engelhardt
2010-06-13 18:17 ` Jonathan Tripathy
2010-06-14 13:17 ` Federico Alberto Sayd
2010-06-14 19:51 ` Narendra Choyal
2010-06-14 20:15 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox