WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [SPAM] Re: [Xen-users] Re: number of ips

To: Eljas Alakulppi <Buzer@xxxxxxxxx>
Subject: Re: [SPAM] Re: [Xen-users] Re: number of ips
From: Anand Gupta <xen.mails@xxxxxxxxx>
Date: Sat, 11 Apr 2009 22:41:41 +0530
Cc: Xen Users <Xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 11 Apr 2009 10:12:39 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Xb0Due+aN0PgsgbW6X4triACnn+Io2KlcVRy8Pw6CKE=; b=bQRDY6HYZATn5SZHeIiihSRKHRozeeEBeQ4P+FVkZIQQEpFci00VOAIP+fEBnElKal cOynUiARwdsFFXvkZqR+z2sMbh7haNyzc3VKIImcqATVzeFHLMmUn7Ft+98Bcx+E2oFN F4o2JTFijm74MF0cVIEFxWHh8C+yPimw79o4g=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=h7/Zk67pZ08Ur+9jinYD3iNkmJVbFl9bKn/hUNvqowBjevjX6HaB7nc6MnGE2/0Sxz BBmeHYRv1Ab+LooXpSXVA4jJ+CAZhnn9SAoB1jlz0qByREjQYyb742VLuMqgwjBOiuK+ 6S5g2VrFJ79iee8I4jDDDJpfK9YEJKrtP8fQ8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Low
In-reply-to: <op.ur73w6jnrtqp7s@chiyo>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <acb757c00904090609y3975792dgd89d28e843ee9ee@xxxxxxxxxxxxxx> <49DFC083.3060604@xxxxxxxxxx> <acb757c00904101516v53fa1aabjbc1eb304aa707280@xxxxxxxxxxxxxx> <49DFDC3F.9080706@xxxxxxxxxx> <49DFDE62.404@xxxxxxxxxx> <acb757c00904110352pafd134bqba01e8a6945f3bbc@xxxxxxxxxxxxxx> <op.ur7y4munrtqp7s@chiyo> <acb757c00904110447h25a98c63w1e86cd0fd2850785@xxxxxxxxxxxxxx> <op.ur73w6jnrtqp7s@chiyo>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Eljas,

My dom0 basically has 2 networks, eth0 - 172.20.x.x and eth1 - 192.168.122.x. Now presently the domU is bound on the bridge with eth0, and which where i am concerned right now. The same would be implemented in a scene with all real ips.

I checked the firewall and there is no firewall enabled on dom0. Sorry but i am still confused on how and what you are proposing here.

On Sat, Apr 11, 2009 at 6:34 PM, Eljas Alakulppi <Buzer@xxxxxxxxx> wrote:
Like I said before, Xen doesn't add DROP rules by default, only ACCEPT (so you need to set policy to DROP. Tho, it does seem like seting antispoof=on should take care of setting policy to DROP on at least Debian. Maybe your firewall script starts after Xen takes care of networking? I have never used Xen on CentOS, so I'm not too sure about it's specific details).

Regarding the fact that there is no IP specifed on the ACCEPT rule, what does your iptables commands in the vif script look like?

Oh, and I assume you want to remove state match from the first rule (otherwise the virtual servers will not allow any new connections) & remove the second rule (allows all traffic orginating from 192.168.122.0/24. If there is no other match requirements, it will allow DomUs to spoof addresses from 192.168.122.0/24). The third FORWARD rule seems like everything gets ACCEPT'ed there. Also, please use iptables-save, iptables -L doesn't include all of the details (like -i and -o).

So, to wrap it up, the iptables-save should look something like:
*filter
...
:FORWARD DROP [0:0]
...
-A FORWARD -d 192.168.122.0/24 -j ACCEPT #Tho, this allows spoofing between two DomUs. You could try adding -m physdev --physdev-in eth0 or whatever your external interface is
...
And once you start, there should be one more rule on FORWARD chain
-A FORWARD -s 192.168.122.5/32 -m physdev --physdev-in vif6.0 -j ACCEPT #or whatever the IP and vif happend to be


-Eljas Alakulppi


On Sat, 11 Apr 2009 14:47:45 +0300, Anand Gupta <xen.mails@xxxxxxxxx> wrote:

I tried to use the antispoof feature thinking it should do the trick.
Modified /etc/xen/xend-config.sxp and modified it as follows:

(network-script 'network-bridge antispoof=yes')

Restarted, xen, and then checked the iptables --list. I don't see the DROP
rules added.

Here is iptables before start of domU

****************************************************************************************************************
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24    state
RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere            reject-with
icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with
icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
****************************************************************************************************************

Here it is after domU was started

****************************************************************************************************************
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24    state
RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere            reject-with
icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with
icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere            PHYSDEV match
--physdev-in vif6.0

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
****************************************************************************************************************

The only difference between both the outputs is

ACCEPT     all  --  anywhere             anywhere            PHYSDEV match
--physdev-in vif6.0

Any ideas why this is happening ?

P.S. : If i am wrong in thinking that the above will resolve the problem of
users binding ips of their domU and using them, please correct me.




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



--
regards,

Anand Gupta
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users