Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Created February 16, 2016 00:31
Show Gist options
  • Save yuuichi-fujioka/6f519b5009996cf68476 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/6f519b5009996cf68476 to your computer and use it in GitHub Desktop.
#!/bin/bash
source ~/devstack/openrc admin admin
neutron net-create external --router:external=True --provider:network_type=local
neutron subnet-create --name external-subnet external 172.19.0.0/24 --dns-nameserver 8.8.8.8 --disable-dhcp
sudo ip addr add 172.19.0.1/24 dev br-ex
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
source ~/devstack/openrc demo demo
neutron net-create private
neutron subnet-create --name private-subnet private 10.0.0.0/24 --dns-nameserver 8.8.8.8
neutron router-create router1
neutron router-interface-add router1 private-subnet
neutron router-gateway-set router1 external
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment