* VLANs
@ 2011-01-10 17:42 Jonathan Tripathy
2011-01-10 21:33 ` VLANs John Haxby
0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Tripathy @ 2011-01-10 17:42 UTC (permalink / raw)
To: netfilter
Hi Everyone,
I wish to use VLANs on my Linux Xen hosts to seperate managed customer
networks.
Can anybody please give me some pointers on how to make the network
secure so no-one can VLAN hop?
At the minute, I plan to set up one bridge per customer, and use linux
vconfig to add an if to the bridge (which I believe strips all tags).
Then, all the respective customer Xen DomU (VM) interfaces will connect
to the bridge.
Thanks
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-10 17:42 VLANs Jonathan Tripathy
@ 2011-01-10 21:33 ` John Haxby
2011-01-10 22:15 ` VLANs Jonathan Tripathy
0 siblings, 1 reply; 15+ messages in thread
From: John Haxby @ 2011-01-10 21:33 UTC (permalink / raw)
To: Jonathan Tripathy; +Cc: netfilter
On 10 Jan 2011, at 17:42, Jonathan Tripathy wrote:
>
> I wish to use VLANs on my Linux Xen hosts to seperate managed customer networks.
>
> Can anybody please give me some pointers on how to make the network secure so no-one can VLAN hop?
>
> At the minute, I plan to set up one bridge per customer, and use linux vconfig to add an if to the bridge (which I believe strips all tags). Then, all the respective customer Xen DomU (VM) interfaces will connect to the bridge.
If each bridge (for each customer) contains just one vlan-tagged physical interface then there is no way for the guests to vlan-hop. A vlan tag added by a guest will either be replaced by the vlan tag of the external interface or the frame will be dropped. If you have multiple vlans on a bridge (with multiple physical interfaces) then the vlan will be chosen by routing if the interfaces have their own addresses, I'm not sure what happens if the interfaces don't have addresses, but when a frame leaves on a vlan interface it acquires the corresponding vlan tag. It doesn't matter what happens to the tag on the way back as it's only relevant to an interface that's on a vlan.
Obviously you should test this, but it's all pretty straightforward and there's nothing special or complicated to set up.
jch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-10 21:33 ` VLANs John Haxby
@ 2011-01-10 22:15 ` Jonathan Tripathy
2011-01-11 8:19 ` VLANs Thomas Berg
2011-01-11 10:42 ` VLANs John Haxby
0 siblings, 2 replies; 15+ messages in thread
From: Jonathan Tripathy @ 2011-01-10 22:15 UTC (permalink / raw)
To: John Haxby, netfilter
On 10/01/11 21:33, John Haxby wrote:
> On 10 Jan 2011, at 17:42, Jonathan Tripathy wrote:
>
>> I wish to use VLANs on my Linux Xen hosts to seperate managed customer networks.
>>
>> Can anybody please give me some pointers on how to make the network secure so no-one can VLAN hop?
>>
>> At the minute, I plan to set up one bridge per customer, and use linux vconfig to add an if to the bridge (which I believe strips all tags). Then, all the respective customer Xen DomU (VM) interfaces will connect to the bridge.
> If each bridge (for each customer) contains just one vlan-tagged physical interface then there is no way for the guests to vlan-hop. A vlan tag added by a guest will either be replaced by the vlan tag of the external interface or the frame will be dropped. If you have multiple vlans on a bridge (with multiple physical interfaces) then the vlan will be chosen by routing if the interfaces have their own addresses, I'm not sure what happens if the interfaces don't have addresses, but when a frame leaves on a vlan interface it acquires the corresponding vlan tag. It doesn't matter what happens to the tag on the way back as it's only relevant to an interface that's on a vlan.
>
> Obviously you should test this, but it's all pretty straightforward and there's nothing special or complicated to set up.
>
> jch
Excellent! Thank you for your explanation.
If a guest maliciously added a vlan tag, wouldn’t it still remain in the
frame, however be "double-tagged" by the outgoing physical port? Even
still though, this probably isn't an issue, provided that all upstream
switches are configured correctly.
In the first instance though, my Xen host will connect directly to my
vlan-aware firewall port
Please let me know if I've got this wrong somewhere...
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-10 22:15 ` VLANs Jonathan Tripathy
@ 2011-01-11 8:19 ` Thomas Berg
2011-01-11 10:26 ` VLANs Jonathan Tripathy
2011-01-11 10:42 ` VLANs John Haxby
1 sibling, 1 reply; 15+ messages in thread
From: Thomas Berg @ 2011-01-11 8:19 UTC (permalink / raw)
To: Jonathan Tripathy; +Cc: John Haxby, netfilter
mån 2011-01-10 klockan 22:15 +0000 skrev Jonathan Tripathy:
> On 10/01/11 21:33, John Haxby wrote:
> > On 10 Jan 2011, at 17:42, Jonathan Tripathy wrote:
> >
> >> I wish to use VLANs on my Linux Xen hosts to seperate managed customer networks.
> >>
> >> Can anybody please give me some pointers on how to make the network secure so no-one can VLAN hop?
> >>
> >> At the minute, I plan to set up one bridge per customer, and use linux vconfig to add an if to the bridge (which I believe strips all tags). Then, all the respective customer Xen DomU (VM) interfaces will connect to the bridge.
> > If each bridge (for each customer) contains just one vlan-tagged physical interface then there is no way for the guests to vlan-hop. A vlan tag added by a guest will either be replaced by the vlan tag of the external interface or the frame will be dropped. If you have multiple vlans on a bridge (with multiple physical interfaces) then the vlan will be chosen by routing if the interfaces have their own addresses, I'm not sure what happens if the interfaces don't have addresses, but when a frame leaves on a vlan interface it acquires the corresponding vlan tag. It doesn't matter what happens to the tag on the way back as it's only relevant to an interface that's on a vlan.
> >
> > Obviously you should test this, but it's all pretty straightforward and there's nothing special or complicated to set up.
> >
> > jch
> Excellent! Thank you for your explanation.
>
> If a guest maliciously added a vlan tag, wouldn’t it still remain in the
> frame, however be "double-tagged" by the outgoing physical port? Even
> still though, this probably isn't an issue, provided that all upstream
> switches are configured correctly.
>
There is an sencario where your customer can make a mess. If the outer
vlan tag is the same as port vlan id aka native vlan on a dot1q enabled
port it will remove the outer tag and forward the packet only with the
inner tag wich was set by your customer.
I should suggest that you only allow ipv4 and arp passing trough to/from
your customer and drop any other frames including frames with vlan tag
set and ethertype x8100.
> In the first instance though, my Xen host will connect directly to my
> vlan-aware firewall port
>
> Please let me know if I've got this wrong somewhere...
> --
> 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
Best regards
Thomas
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-11 8:19 ` VLANs Thomas Berg
@ 2011-01-11 10:26 ` Jonathan Tripathy
0 siblings, 0 replies; 15+ messages in thread
From: Jonathan Tripathy @ 2011-01-11 10:26 UTC (permalink / raw)
To: thomas.berg, netfilter
On 11/01/11 08:19, Thomas Berg wrote:
> mån 2011-01-10 klockan 22:15 +0000 skrev Jonathan Tripathy:
>> On 10/01/11 21:33, John Haxby wrote:
>>> On 10 Jan 2011, at 17:42, Jonathan Tripathy wrote:
>>>
>>>> I wish to use VLANs on my Linux Xen hosts to seperate managed customer networks.
>>>>
>>>> Can anybody please give me some pointers on how to make the network secure so no-one can VLAN hop?
>>>>
>>>> At the minute, I plan to set up one bridge per customer, and use linux vconfig to add an if to the bridge (which I believe strips all tags). Then, all the respective customer Xen DomU (VM) interfaces will connect to the bridge.
>>> If each bridge (for each customer) contains just one vlan-tagged physical interface then there is no way for the guests to vlan-hop. A vlan tag added by a guest will either be replaced by the vlan tag of the external interface or the frame will be dropped. If you have multiple vlans on a bridge (with multiple physical interfaces) then the vlan will be chosen by routing if the interfaces have their own addresses, I'm not sure what happens if the interfaces don't have addresses, but when a frame leaves on a vlan interface it acquires the corresponding vlan tag. It doesn't matter what happens to the tag on the way back as it's only relevant to an interface that's on a vlan.
>>>
>>> Obviously you should test this, but it's all pretty straightforward and there's nothing special or complicated to set up.
>>>
>>> jch
>> Excellent! Thank you for your explanation.
>>
>> If a guest maliciously added a vlan tag, wouldn’t it still remain in the
>> frame, however be "double-tagged" by the outgoing physical port? Even
>> still though, this probably isn't an issue, provided that all upstream
>> switches are configured correctly.
>>
> There is an sencario where your customer can make a mess. If the outer
> vlan tag is the same as port vlan id aka native vlan on a dot1q enabled
> port it will remove the outer tag and forward the packet only with the
> inner tag wich was set by your customer.
>
> I should suggest that you only allow ipv4 and arp passing trough to/from
> your customer and drop any other frames including frames with vlan tag
> set and ethertype x8100.
Hi Thomas,
While I have made sure that my trunk ports do not have a native vlan
associated with them, I still think it's a good idea to use ebtables to
prevent tagging from the customers. What would the command be?
Thanks
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-10 22:15 ` VLANs Jonathan Tripathy
2011-01-11 8:19 ` VLANs Thomas Berg
@ 2011-01-11 10:42 ` John Haxby
2011-01-11 10:57 ` VLANs Jonathan Tripathy
1 sibling, 1 reply; 15+ messages in thread
From: John Haxby @ 2011-01-11 10:42 UTC (permalink / raw)
To: Jonathan Tripathy; +Cc: netfilter
On 10/01/11 22:15, Jonathan Tripathy wrote:
> If a guest maliciously added a vlan tag, wouldn’t it still remain in
> the frame, however be "double-tagged" by the outgoing physical port?
> Even still though, this probably isn't an issue, provided that all
> upstream switches are configured correctly.
I don't believe that this is an issue. And 802.1ad double tag won't be
recognised so it will either be dropped by the switch or dropped by the
outgoing NIC on the bridge. Short of constructing frames by hand,
though, I'm not sure how you would go about adding an 802.1ad vlan tag
on top of an 802.1q vlan tag.
jch
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-11 10:42 ` VLANs John Haxby
@ 2011-01-11 10:57 ` Jonathan Tripathy
[not found] ` <4D2C47DB.10702@oracle.com>
0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Tripathy @ 2011-01-11 10:57 UTC (permalink / raw)
To: John Haxby; +Cc: netfilter
> On 10/01/11 22:15, Jonathan Tripathy wrote:
>> If a guest maliciously added a vlan tag, wouldn’t it still remain in
>> the frame, however be "double-tagged" by the outgoing physical port?
>> Even still though, this probably isn't an issue, provided that all
>> upstream switches are configured correctly.
>
> I don't believe that this is an issue. And 802.1ad double tag won't
> be recognised so it will either be dropped by the switch or dropped by
> the outgoing NIC on the bridge. Short of constructing frames by
> hand, though, I'm not sure how you would go about adding an 802.1ad
> vlan tag on top of an 802.1q vlan tag.
>
I wish it wasn't an issue. Many switches allow hosts to vlan hop if the
native vlan of a trunk port is the same as the native vlan of the host.
It's eaisly prevent t hough with proper switch configuration.
What ebtable command would I use to prevent *any* tagged frames coming
from a host?
^ permalink raw reply [flat|nested] 15+ messages in thread
* VLANs
@ 2011-01-05 12:12 Jonathan Tripathy
2011-01-06 7:32 ` VLANs John Haxby
0 siblings, 1 reply; 15+ messages in thread
From: Jonathan Tripathy @ 2011-01-05 12:12 UTC (permalink / raw)
To: netfilter
Hi Everyone,
If I plug my Xen host to a VLAN aware switch using a trunk port (I.e.
all frames are tagged), can my Xen host, using a linux bridge, strip out
all tagging and send frame to correct Xen VM? (And vice versa)
I wish to have isolated and secure networks that cannot communicate
except via my VLAN aware firewall (pfsense)
Thanks
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: VLANs
2011-01-05 12:12 VLANs Jonathan Tripathy
@ 2011-01-06 7:32 ` John Haxby
0 siblings, 0 replies; 15+ messages in thread
From: John Haxby @ 2011-01-06 7:32 UTC (permalink / raw)
To: Jonathan Tripathy; +Cc: netfilter
On 5 Jan 2011, at 12:12, Jonathan Tripathy wrote:
>
> If I plug my Xen host to a VLAN aware switch using a trunk port (I.e. all frames are tagged), can my Xen host, using a linux bridge, strip out all tagging and send frame to correct Xen VM? (And vice versa)
Yes. The outgoing interface on the bridge deals with the VLAN tag.
>
> I wish to have isolated and secure networks that cannot communicate except via my VLAN aware firewall (pfsense)
Yup, that's what you get.
jch
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-01-11 17:21 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 17:42 VLANs Jonathan Tripathy
2011-01-10 21:33 ` VLANs John Haxby
2011-01-10 22:15 ` VLANs Jonathan Tripathy
2011-01-11 8:19 ` VLANs Thomas Berg
2011-01-11 10:26 ` VLANs Jonathan Tripathy
2011-01-11 10:42 ` VLANs John Haxby
2011-01-11 10:57 ` VLANs Jonathan Tripathy
[not found] ` <4D2C47DB.10702@oracle.com>
2011-01-11 12:24 ` VLANs Jonathan Tripathy
2011-01-11 12:48 ` VLANs John Haxby
2011-01-11 12:52 ` VLANs Jonathan Tripathy
2011-01-11 17:12 ` VLANs John Haxby
2011-01-11 17:15 ` VLANs Jonathan Tripathy
2011-01-11 17:21 ` VLANs John Haxby
-- strict thread matches above, loose matches on Subject: below --
2011-01-05 12:12 VLANs Jonathan Tripathy
2011-01-06 7:32 ` VLANs John Haxby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox