This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Server to answer requests from Libvirt VMs to http://169.254.169.254/ | |
Cloud images usually don't have a preset user/password, and this is needed to add a ssh pub key to .ssh/authorized_hosts. | |
Change SSH_PUB_KEY path below. | |
pip install bottle | |
sudo ip address add 169.254.169.254 dev virbr0 | |
open firewall | |
-A ufw-user-input -s 192.168.122.0/24 -d 169.254.169.254/32 -i virbr0 -p tcp -m tcp --dport 80 -j ACCEPT |