iptables drops forward rules for hosts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Vish Ishaya | ||
Diablo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Problem)
This is my multi_host configuration.
Host: nova-1, nova-2
instnace: instance-
bridge: br100(10.0.149.3, nova-1), br100(10.0.149.5, nova-2)
when I try to ping instance-1 at nova-2. any reply didn't come.
and also ping instance-2 at nova-1, result is same.
but, ping to bridge(
ping to bridge(
so, I check iptables.
This is rule of cause of problem.
# iptables -L
....
Chain nova-network-
target prot opt source destination
DROP all -- anywhere anywhere
DROP all -- anywhere anywhere
....
so, I drop this rule,
# iptables -D nova-network-
# iptables -D nova-network-
then,
any instance can ping and ssh to other instance.
this rule add when nova-network start or new instance become boot.
this is code of above rule.
nova.network.
997 if gateway:
998 iptables_
999 '--in-interface %s -j ACCEPT' % \
1000 bridge)
1001 iptables_
1002 '--out-interface %s -j ACCEPT' % \
1003 bridge)
1004 # else:
1005 # iptables_
1006 # '--in-interface %s -j DROP' % \
1007 # bridge)
1008 # iptables_
1009 # '--out-interface %s -j DROP' % \
1010 # bridge)
1011 #
I modified 1004 ~ 1010 lines. I commented out that else: routine and I restart nova-network module.
then, above rule didn't appears.
# iptables -L
...
Chain nova-network-
target prot opt source destination
...
I think instance can connect any host in multi_host configuration. so that rule should be modified.
tags: | added: iptables |
summary: |
- iptables problem: can't connect from other host to instance + iptables drops forward rules for hosts |
Changed in nova: | |
milestone: | none → essex-2 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-2 → 2012.1 |
VMs aren't necessarily supposed to be pingable from hosts. They should be pingable from the network host (or any host if using a --multi_host network) if the flag --allow_ same_net_ traffic is true. Otherwise you need to specifically allow connections via security group rules.
On Nov 14, 2011, at 4:39 AM, jaesanglee wrote:
> Public bug reported: 1(10.0. 149.4, nova-1), instance- 2(10.0. 149.6nova- 2) 10.0.149. 3,nova- 1) from nova-2 is ok. 10.0.149. 5,nova- 2) from nova-1 is also ok. FORWARD (1 references) FORWARD 2 FORWARD 1 linux_net. py manager. ipv4['filter' ].add_rule( 'FORWARD' , manager. ipv4['filter' ].add_rule( 'FORWARD' , manager. ipv4['filter' ].add_rule( 'FORWARD' , manager. ipv4['filter' ].add_rule( 'FORWARD' , FORWARD (1 references) /bugs.launchpad .net/bugs/ 890195 1(10.0. 149.4, nova-1), i...
>
> Problem)
> This is my multi_host configuration.
> Host: nova-1, nova-2
> instnace: instance-
> bridge: br100(10.0.149.3, nova-1), br100(10.0.149.5, nova-2)
>
> when I try to ping instance-1 at nova-2. any reply didn't come.
> and also ping instance-2 at nova-1, result is same.
>
> but, ping to bridge(
> ping to bridge(
>
> so, I check iptables.
> This is rule of cause of problem.
> # iptables -L
> ....
> Chain nova-network-
> target prot opt source destination
> DROP all -- anywhere anywhere
> DROP all -- anywhere anywhere
> ....
> so, I drop this rule,
> # iptables -D nova-network-
> # iptables -D nova-network-
>
> then,
> any instance can ping and ssh to other instance.
>
> this rule add when nova-network start or new instance become boot.
>
> this is code of above rule.
>
> nova.network.
> 997 if gateway:
> 998 iptables_
> 999 '--in-interface %s -j ACCEPT' % \
> 1000 bridge)
> 1001 iptables_
> 1002 '--out-interface %s -j ACCEPT' % \
> 1003 bridge)
> 1004 # else:
> 1005 # iptables_
> 1006 # '--in-interface %s -j DROP' % \
> 1007 # bridge)
> 1008 # iptables_
> 1009 # '--out-interface %s -j DROP' % \
> 1010 # bridge)
> 1011 #
>
> I modified 1004 ~ 1010 lines. I commented out that else: routine and I
> restart nova-network module.
>
> then, above rule didn't appears.
>
> # iptables -L
> ...
> Chain nova-network-
> target prot opt source destination
> ...
>
> I think instance can connect any host in multi_host configuration. so
> that rule should be modified.
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https:/
>
> Title:
> iptables problem: can't connect from other host to instance
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Problem)
> This is my multi_host configuration.
> Host: nova-1, nova-2
> instnace: instance-