summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-02-10 18:34:50 +0000
committerTarmac <>2011-02-10 18:34:50 +0000
commitac7eb23c88437fa30f0ab256f53ba8a2df6e7965 (patch)
tree6a857bb90d276297879f8d1b9ba9b89f3963f455
parentac0fb8fe22daae3dfadb38fc71a07377f12f3041 (diff)
parentaff63810b287fdbd0eb6b2e8881dcf6683ed7d91 (diff)
downloadnova-ac7eb23c88437fa30f0ab256f53ba8a2df6e7965.tar.gz
nova-ac7eb23c88437fa30f0ab256f53ba8a2df6e7965.tar.xz
nova-ac7eb23c88437fa30f0ab256f53ba8a2df6e7965.zip
Add forwarding rules for floating IPs to the OUTPUT chain on the network node in addition to the PREROUTING chain.
-rw-r--r--nova/network/linux_net.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
index df54606db..ed37e8ba7 100644
--- a/nova/network/linux_net.py
+++ b/nova/network/linux_net.py
@@ -156,6 +156,8 @@ def ensure_floating_forward(floating_ip, fixed_ip):
"""Ensure floating ip forwarding rule"""
_confirm_rule("PREROUTING", "-t nat -d %s -j DNAT --to %s"
% (floating_ip, fixed_ip))
+ _confirm_rule("OUTPUT", "-t nat -d %s -j DNAT --to %s"
+ % (floating_ip, fixed_ip))
_confirm_rule("SNATTING", "-t nat -s %s -j SNAT --to %s"
% (fixed_ip, floating_ip))
@@ -164,6 +166,8 @@ def remove_floating_forward(floating_ip, fixed_ip):
"""Remove forwarding for floating ip"""
_remove_rule("PREROUTING", "-t nat -d %s -j DNAT --to %s"
% (floating_ip, fixed_ip))
+ _remove_rule("OUTPUT", "-t nat -d %s -j DNAT --to %s"
+ % (floating_ip, fixed_ip))
_remove_rule("SNATTING", "-t nat -s %s -j SNAT --to %s"
% (fixed_ip, floating_ip))