Ask Your Question

i want flush iptable from Host after creation of VM using heat temlplate

asked 2014-10-29 02:40:20 -0600

harishamrale gravatar image

i want flush iptable from Host (Not form inside VM) after creation of VM using heat temlplate. Is there any way to do it.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-10-29 07:56:42 -0600

fgorbat gravatar image

Yes, the best way to do it, using the user_data section of the server definition. Here is basic example how to do it:

    type: OS::Nova::Server
      key_name: { get_param: key_name }
      image: { get_param: image }
      flavor: { get_param: flavor }
      admin_pass: { get_param: admin_pass }
          template: |
            iptables --flush  # flush all the previous rules
            service iptables save  # save new configuration
            service iptables restart # restart the iptables service
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-10-29 02:40:20 -0600

Seen: 182 times

Last updated: Oct 29 '14