Permalink
Please sign in to comment.
Browse files
Add conjureup0 network bridge
Previously, we handled this bridge creation during the installation of the openstack package. However, now that conjure-up can be invoked without any spell initially this disrupts the user experience by putting them back into the shell to install another deb package to get that network bridge setup. This includes a default network bridge which spells can make use of if necessary. Signed-off-by: Adam Stokes <battlemidget@users.noreply.github.com>
- Loading branch information...
Showing
with
56 additions
and 2 deletions.
- +3 −1 debian/conjure-up.install
- +15 −0 debian/conjure-up.service
- +9 −1 debian/rules
- +15 −0 init/bridge.start
- +14 −0 init/bridge.stop
| @@ -1,2 +1,4 @@ | ||
| conjure-up-rsyslog.conf usr/share/conjure-up | ||
| -etc/* | ||
| +etc/* | ||
| +init/bridge.start usr/lib/conjure-up | ||
| +init/bridge.stop usr/lib/conjure-up |
| @@ -0,0 +1,15 @@ | ||
| +[Unit] | ||
| +Description=conjure-up - network bridge | ||
| +Documentation=man:conjure-up(1) | ||
| +After=network-online.target | ||
| +Before=lxd.service | ||
| +Requires=network-online.target | ||
| + | ||
| +[Service] | ||
| +Type=oneshot | ||
| +RemainAfterExit=yes | ||
| +ExecStart=/usr/lib/conjure-up/bridge.start | ||
| +ExecStop=/usr/lib/conjure-up/bridge.stop | ||
| + | ||
| +[Install] | ||
| +WantedBy=multi-user.target |
10
debian/rules
| @@ -0,0 +1,15 @@ | ||
| +#!/bin/sh | ||
| + | ||
| +ip link add dev conjureup0 type bridge | ||
| +ip addr add 10.99.0.1/24 dev conjureup0 | ||
| +ip link set dev conjureup0 up | ||
| + | ||
| +echo 1 > /proc/sys/net/ipv4/ip_forward | ||
| + | ||
| +iptables -I FORWARD -i conjureup0 -j ACCEPT | ||
| +iptables -I FORWARD -o conjureup0 -j ACCEPT | ||
| +iptables -t nat -A POSTROUTING -s 10.99.0.1/24 ! -d 10.99.0.1/24 -j MASQUERADE | ||
| +iptables -I INPUT -i conjureup0 -p tcp -m tcp --dport 53 -j ACCEPT | ||
| +iptables -I INPUT -i conjureup0 -p udp -m udp --dport 53 -j ACCEPT | ||
| +iptables -I INPUT -i conjureup0 -p tcp -m tcp --dport 67 -j ACCEPT | ||
| +iptables -I INPUT -i conjureup0 -p udp -m udp --dport 67 -j ACCEPT |
| @@ -0,0 +1,14 @@ | ||
| +#!/bin/sh | ||
| + | ||
| +ip addr flush dev conjureup0 | ||
| +ip link set dev conjureup0 down | ||
| + | ||
| +iptables -D FORWARD -i conjureup0 -j ACCEPT | ||
| +iptables -D FORWARD -o conjureup0 -j ACCEPT | ||
| + | ||
| +iptables -D INPUT -i conjureup0 -p tcp -m tcp --dport 53 -j ACCEPT | ||
| +iptables -D INPUT -i conjureup0 -p udp -m udp --dport 53 -j ACCEPT | ||
| +iptables -D INPUT -i conjureup0 -p tcp -m tcp --dport 67 -j ACCEPT | ||
| +iptables -D INPUT -i conjureup0 -p udp -m udp --dport 67 -j ACCEPT | ||
| + | ||
| +iptables -t nat -D POSTROUTING -s 10.99.0.1/24 ! -d 10.99.0.1/24 -j MASQUERADE |
0 comments on commit
50f4899