Hi,<br><br>I've run into a funny issue today.<br><br>2 different vm-s from the same project landed on the same physical hypervisor.<br><br>Security groups for the project filter traffic based on floating ips assigned to vm-s. It looks like this:<br>
<br>+-------------+-----------+---------+----------------+--------------+<br>| IP Protocol | From Port | To Port |    IP Range    | Source Group |<br>+-------------+-----------+---------+----------------+--------------+<br clear="all">
|tcp         | 6379      | 6379    | <floating_ip_addr>/32 <br><br><br>However - this rule does not work if the server (which listens on port 6379 in this case) and client (the one that owns floating_ip_addr) are located on the same physical server (hypervisor).<br>
This is because in the PREROUTING chain there are DNAT rules which substitude floating_ip_addr of the server with its fixed_ip_addr.<br><br>So:<br>1. The traffic from client never goes beyond br100 and never hits the POSTROUTING chain where SNAT is done.<br>
2. For the server, the client traffic appears as it is coming straight from its fixed_ip.<br>3. The firewall rules for the server only let floating_ip_addr in, which results in packet drops.<br><br>You still can work it around by filtering traffic based on fixed_ips, but I think one needs to assume, that most of the clients will want to operate on floating ips when it comes to security groups. It also causes a security risk as fixed ips may be recycled and reused by other projects.<br>
<br>Anyone came across that? How did you work it around?<br><br>Cheers,<br>-Piotr<br><br>-- <br>checkout my blog on linux clusters:<br>-- <a href="http://linuxdatacenter.blogspot.com">linuxdatacenter.blogspot.com</a> --<br>