Bug 443237 - Xen IP antispoofing is not working when multiple antispoof ip addesses are specified
Summary: Xen IP antispoofing is not working when multiple antispoof ip addesses are sp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.2
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Michal Novotny
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 514498
TreeView+ depends on / blocked
 
Reported: 2008-04-19 16:28 UTC by Arturas Moskvinas
Modified: 2014-02-02 22:36 UTC (History)
6 users (show)

Fixed In Version: xen-3.0.3-115.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-13 22:16:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix Xen IP antispoofing for multiple antispoof IP addresses (370 bytes, patch)
2010-07-21 06:00 UTC, Michal Novotny
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0031 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-01-12 15:59:24 UTC

Description Arturas Moskvinas 2008-04-19 16:28:20 UTC
Description of problem:
Xen supports IP antispoofing using iptables. It can also support multiple ip
antispoofing (several IP's for one interface, simply separated by spaces), but
it is not possible to have several IPs, because of the bug in
/etc/xen/scripts/vif-common.sh script.

Version-Release number of selected component (if applicable):
All?

How reproducible:
Always

Steps to Reproduce:
1. Create guest domain config with this network config sample: vif = [
'mac=some_mac, bridge=xenbr0, ip=10.X.X.X 10.X.X.Y' ]
2. Start domain
3. iptables -L
  
Actual results:
Failed iptables command is logged in /var/log/messages. iptables -L shows that
there is no FORWARD rules which will let those ip to pass through. Guest domain
has no net connectivity because packets are dropped by default forward rule.
messages log example:
Apr 19 18:21:04 somehost logger: /etc/xen/scripts/vif-bridge: iptables -A
FORWARD -m physdev --physdev-in vifXX.0 -s 10.X.X.X 10.X.X.Y -j ACCEPT failed.
If you are using iptables, this may affect networking for guest domains.

Expected results:
iptables -L should return:
-A FORWARD -s 10.X.X.X -m physdev  --physdev-in vifXX.0 -j ACCEPT 
-A FORWARD -s 10.X.X.Y -m physdev  --physdev-in vifXX.0 -j ACCEPT
other rules...
Guest domain has connectivity, packets are not dropped by default forward rules,
but accepted by rules above.

Additional info:

Bug in /etc/xen/scripts/vif-common.sh
line 106
for addr in "$ip"
do
    frob_iptable -s "$addr"
done
should be:
for addr in $ip
do
    frob_iptable -s "$addr"
done

Comment 5 Michal Novotny 2010-07-21 06:00:11 UTC
Created attachment 433305 [details]
Fix Xen IP antispoofing for multiple antispoof IP addresses

Arturas,
I've tried this one and it's working fine. Also, thanks for your patch, it's working fine.

Michal

Comment 11 errata-xmlrpc 2011-01-13 22:16:11 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0031.html


Note You need to log in before you can comment on or make changes to this bug.