> Is the DNAT rule expected to work? Does linux_net.py need a special
> case for when the metadata address is on the local host?
For now, I've modified linux_net.py so that it conditionally creates a REDIRECT
rule if FLAGS.metadata_host is 127.0.0.1:
def metadata_forward():
"""Create forwarding rule for metadata."""
if FLAGS.metadata_host == '127.0.0.1':
iptables_manager.ipv4['nat'].add_rule('PREROUTING',
'-s 0.0.0.0/0 -d
169.254.169.254/32 '
'-p tcp -m tcp --dport 80 -j
REDIRECT '
'--to-ports %s' %
(FLAGS.metadata_port))
else:
iptables_manager.ipv4['nat'].add_rule('PREROUTING',
'-s 0.0.0.0/0 -d
169.254.169.254/32 '
'-p tcp -m tcp --dport 80 -j
DNAT '
'--to-destination %s:%s' %
(FLAGS.metadata_host,
FLAGS.metadata_port))
iptables_manager.apply()
--
Lars Kellogg-Stedman <[email protected]> |
Senior Technologist | http://ac.seas.harvard.edu/
Academic Computing |
http://code.seas.harvard.edu/
Harvard School of Engineering and Applied Sciences |
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp