restore NAT to hosts without floatips

This commit is contained in:
Jeremy Hanmer 2014-10-30 10:17:33 -07:00
parent d6b9d5ee02
commit 5d20507772
2 changed files with 6 additions and 1 deletions

View File

@ -316,7 +316,11 @@ class IPTablesManager(base.Manager):
fip.fixed_ip
), ip_version=4
))
rules.append(
Rule('-A POSTROUTING -o %s -j MASQUERADE' % (
ext_if.ifname
), ip_version=4
))
return rules
def _build_public_snat_chain(self, config):

View File

@ -86,6 +86,7 @@ V4_OUTPUT = [
'-A PREROUTING -i eth1 -d 172.16.77.50 -j DNAT --to-destination 192.168.0.2', # noqa
'-A PREROUTING -i eth2 -d 172.16.77.50 -j DNAT --to-destination 192.168.0.2', # noqa
'-A PREROUTING -i eth2 -d 169.254.169.254 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:9602', # noqa
'-A POSTROUTING -o eth1 -j MASQUERADE',
'COMMIT',
'*raw',
':INPUT - [0:0]',