<div dir="ltr">Hi Martinx, <div><br></div><div>can you confirm that firewall_driver is under the securitygroup section? I can confirm that the following nova.conf and ovs_neutron_plugin.ini work with security groups: </div>
<div><br></div><div>nova.conf <a href="http://codepad.org/vH3aIs8f">http://codepad.org/vH3aIs8f</a></div><div>ovs_neutron_plugin.ini - <a href="http://codepad.org/vH3aIs8f">http://codepad.org/vH3aIs8f</a></div><div><br>Aaron</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 8:41 PM, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The only way I'm seeing to protect your Havana cloud right now (topology Per-Tenants Router with Private Networks), is by enabling FWaaS...<div>
<br></div><div>That's it! FWaaS installed, Tenant network protected.</div>
<div><br></div><div>I think that there is a bug with Security Groups in Havana / Neutron...</div><div><br></div><div>Comments?!</div><div><br></div><div>Regards,</div><div>Thiago</div></div><div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On 28 October 2013 22:18, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Guys,<div><br></div><div>A new test to see that the packages currently did not mach any iptables rules at the compute node, completely bypassing "Security Groups", look:</div><div><br></div><div>
<br>
</div><div>* Instance with ONLY port 80 TCP open:</div><div><br></div><div>---</div><div><div>root@hypervisor-1:~# <b>iptables -L neutron-openvswi-i2fa3cfab-a -nv</b></div><div>Chain neutron-openvswi-i2fa3cfab-a (1 references)</div>
<div>
<div> pkts bytes target prot opt in out source destination </div><div> 0 0 DROP all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> state INVALID</div>
<div> 0 0 RETURN all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> state RELATED,ESTABLISHED</div><div>
0 0 RETURN tcp -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> tcp dpt:80</div>
<div> 0 0 RETURN udp -- * * 192.168.50.3 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> udp spt:67 dpt:68</div><div> 0 0 neutron-openvswi-sg-fallback all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> </div>
</div></div><div>---<br></div><div><br></div><div>Starting dumping TCP data directly on instance port:</div><div><br></div><div>---</div><div><div>root@hypervisor-1:~# <b>tcpdump -ni tap2fa3cfab-a3</b></div><div>tcpdump: WARNING: tap2fa3cfab-a3: no IPv4 address assigned</div>
<div>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode</div><div>listening on tap2fa3cfab-a3, link-type EN10MB (Ethernet), capture size 65535 bytes</div></div><div>....</div><div>---</div><div><br>
</div><div>....and trying to connect at its port 22 from the Internet (not allowed!!):</div><div><br></div><div>---</div><div><div>thiago@desktop-1:~$ <b>telnet <a href="tel:189.8.93.69%2022" value="+551898936922" target="_blank">189.8.93.69 22</a></b></div>
<div>Trying 189.8.93.69...</div><div>
Connected to 189.8.93.69.</div><div>Escape character is '^]'.</div><div>SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1</div></div><div>---<br></div><div><br></div><div>NOTE: <b>189.8.93.69</b> is the 'Floating IP' attached to that Instance and <b>192.168.50.2</b> is the Instance IP.</div>
<div><br></div><div>---</div><div><div>root@hypervisor-1:~# <b>tcpdump -ni tap2fa3cfab-a3</b></div><div>tcpdump: WARNING: tap2fa3cfab-a3: no IPv4 address assigned</div><div>tcpdump: verbose output suppressed, use -v or -vv for full protocol decode</div>
<div>listening on tap2fa3cfab-a3, link-type EN10MB (Ethernet), capture size 65535 bytes</div><div>22:13:40.800122 IP 200.232.113.107.7955 > 192.168.50.2.22: Flags [S], seq <a href="tel:2257975349" value="+552257975349" target="_blank">2257975349</a>, win 29200, options [mss 1460,sackOK,TS val 52435018 ecr 0,nop,wscale 7], length 0</div>
<div>22:13:40.800525 IP 192.168.50.2.22 > 200.232.113.107.7955: Flags [S.], seq <a href="tel:2704020835" value="+12704020835" target="_blank">2704020835</a>, ack <a href="tel:2257975350" value="+552257975350" target="_blank">2257975350</a>, win 14480, options [mss 1460,sackOK,TS val 703831 ecr 52435018,nop,wscale 2], length 0</div>
<div>22:13:40.805484 IP 200.232.113.107.7955 > 192.168.50.2.22: Flags [.], ack 1, win 229, options [nop,nop,TS val 52435019 ecr 703831], length 0</div>
<div>22:13:40.821804 IP 192.168.50.2.22 > 200.232.113.107.7955: Flags [P.], seq 1:42, ack 1, win 3620, options [nop,nop,TS val 703837 ecr 52435019], length 41</div><div>22:13:40.826058 IP 200.232.113.107.7955 > 192.168.50.2.22: Flags [.], ack 42, win 229, options [nop,nop,TS val 52435025 ecr 703837], length 0</div>
</div><div>---</div><div><br></div><div>See?! Security Groups are being ignored.</div><div><br></div><div>Please, help!</div><div><br></div><div>Thanks! =)</div><div>Thiago<br></div></div><div><div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On 28 October 2013 22:03, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Okay, I think I got it...<div><br></div><div>Nova should proxy 'Security Groups' calls to Neutron (and not do it by itself), so, it must have:</div><div><br></div><div>--- nova.conf ---</div><div>
<div><div>
firewall_driver = nova.virt.firewall.NoopFirewallDriver</div><div>security_group_api = neutron</div></div><div>---</div><div><br></div></div><div>At Neutron OVS Agent (ovs_neutron_plugin.ini), you must set:</div><div><br>
</div>
<div>---</div><div>firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver<br></div><div>---</div><div><br></div><div>Source: <a href="http://docs.openstack.org/havana/install-guide/install/apt/content/install-neutron.install-plugin.ovs.html" target="_blank">http://docs.openstack.org/havana/install-guide/install/apt/content/install-neutron.install-plugin.ovs.html</a></div>
<div><br></div><div>BUT, it doesn't work.</div><div><br></div><div>All my Security Groups rules are just being ignored. They are all applied at the Compute Node OVS ports but, no effect at all.</div><div><br></div><div>
Thanks!</div><div>Thiago</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 October 2013 21:26, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well,<div><br></div><div>Now I'm using "firewall_driver = nova.virt.firewall.NoopFirewallDriver" for both Nova and Neutron (Open vSwitch Agent) but, Security Groups rules are applied but ignored.</div>
<div><br></div><div>Tips!?</div><div><br></div><div>Thanks!</div><div>Thiago</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 October 2013 21:13, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Guys,<div><br></div><div>I'm back using "libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver" (nova-compute.conf) but the problem persist for "tenant1".</div>
<div>
<br></div><div>My nova.conf contains:</div><div><br></div><div>---</div><div><div># Network settings</div><div>network_api_class = nova.network.neutronv2.api.API</div><div>neutron_url = <a href="http://contrller-1.mydomain.com:9696" target="_blank">http://contrller-1.mydomain.com:9696</a></div>
<div>neutron_auth_strategy = keystone</div><div>neutron_admin_tenant_name = service</div><div>neutron_admin_username = neutron</div><div>neutron_admin_password = 123test123</div><div>neutron_admin_auth_url = <a href="http://controller-1.mydomain.com:35357/v2.0" target="_blank">http://controller-1.mydomain.com:35357/v2.0</a></div>
<div><br></div><div>linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver</div><div><br></div><div># If you want Neutron + Nova Security groups</div><div>firewall_driver = nova.virt.firewall.NoopFirewallDriver</div>
<div>security_group_api = neutron</div></div><div>---</div><div><br></div><div>Is that a valid configuration for Havana?! I'm get it from my previous Grizzly setup.</div><div><br></div><div>Also, I just realized that, there are two places to configure the "firewall_driver", first one is located at nova.conf, the second is located at "ovs_neutron_plugin.ini" under [securitygroups], of course, I believe, they must "match", I mean, I must be the same for both services, right?!</div>
<div><br></div><div>Thanks!</div><div>Thiago</div>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 October 2013 20:30, Martinx - $B%8%'!<%`%:(B <span dir="ltr"><<a href="mailto:thiagocmartinsc@gmail.com" target="_blank">thiagocmartinsc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Stackers!<div><br></div><div>I'm trying to configure my Security Groups and, I'm seeing that the rules are being applied at the Compute Node OVS ports (iptables / ip6tables) BUT, it does have no effect (or just being ignored?).</div>
<div>
<br></div><div>I'm using Ubuntu 12.04.3 + Havana from Cloud Archive.</div><div><br></div><div><br></div><div>For example:</div><div><br></div><div>I have 1 Instance with 1 Floating IP attached to it, open port is: 80.</div>
<div><br></div><div>Look:</div><div><br></div><div>---</div><div><div>root@hypervisor-1:~# iptables -L neutron-openvswi-i9cf07c24-7 -nv </div><div>Chain neutron-openvswi-i9cf07c24-7 (1 references)</div><div> pkts bytes target prot opt in out source destination </div>
<div> 0 0 DROP all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> state INVALID</div><div> 0 0 RETURN all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> state RELATED,ESTABLISHED</div>
<div> 0 0 RETURN tcp -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> tcp dpt:80</div><div> 0 0 RETURN udp -- * * 192.168.50.3 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> udp spt:67 dpt:68</div>
<div> 0 0 neutron-openvswi-sg-fallback all -- * * <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> </div><div>---</div>
</div><div><br></div><div><br>
</div><div>The problem is that the respective Instance still answers SSH to the Internet. I mean, ALL ports are OPEN!! Regardless of what I typed at its Security Groups.</div><div><br></div><div>I created one "Security Group", called "web", only with TCP port 80 on it, nothing more, nothing less. This Instance doesn't belong to the "default" Security Group", only "web".</div>
<div><br></div><div>Recently I've changed the <b>libvirt_vif_driver</b> from <b>nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver</b> to <b>nova.virt.libvirt.vif.LibvirtOpenVswitchDriver</b>, maybe it is the cause?!</div>
<div><br></div><div><div>Any tips!?</div></div><div><br></div><div>Thanks!</div><div>Thiago</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div>