diff options
| author | Soren Hansen <soren@linux2go.dk> | 2011-02-10 14:31:51 +0100 |
|---|---|---|
| committer | Soren Hansen <soren@linux2go.dk> | 2011-02-10 14:31:51 +0100 |
| commit | aff63810b287fdbd0eb6b2e8881dcf6683ed7d91 (patch) | |
| tree | 281fe7011cc655052d81a3c4c61f67f1eabcb945 | |
| parent | 5e66cf492f150bfbd01e5983d876192c5b158343 (diff) | |
| download | nova-aff63810b287fdbd0eb6b2e8881dcf6683ed7d91.tar.gz nova-aff63810b287fdbd0eb6b2e8881dcf6683ed7d91.tar.xz nova-aff63810b287fdbd0eb6b2e8881dcf6683ed7d91.zip | |
Also add floating ip forwarding to OUTPUT chain.
| -rw-r--r-- | nova/network/linux_net.py | 4 |
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)) |
