...
 
Commits (3)
......@@ -52,15 +52,21 @@ Vagrant.configure("2") do |config|
################# BOUNDERY SERVER #################
config.vm.define "boundery.me" do |boundery|
boundery.vm.hostname = "boundery"
boundery.vm.network "private_network", ip: "30.0.1.9",
boundery.vm.network "private_network", auto_config: false,
virtualbox__intnet: "boundery_inet"
boundery.vm.provision "shell", inline: <<-SHELL
sudo cp /vagrant/boundery/nodnsupdate /etc/dhcp/dhclient-enter-hooks.d/
sudo chmod a+x /etc/dhcp/dhclient-enter-hooks.d/nodnsupdate
sudo cp /vagrant/boundery/boundery.conf /etc/network/interfaces.d/
sudo ifup -a
sudo cp /vagrant/inet/pebble/pebble.minica.pem /usr/local/share/ca-certificates/pebble.minica.crt
sudo update-ca-certificates
sudo mkdir -p /root/data/centralui
sudo cp /vagrant/boundery/email.json /vagrant/boundery/recaptcha.json /root/data/centralui/
sudo cp /vagrant/boundery/rc.local /etc/
sudo chmod a+x /etc/rc.local
sudo /etc/rc.local
......@@ -70,23 +76,22 @@ Vagrant.configure("2") do |config|
################# HOME ROUTER #################
config.vm.define "router" do |router|
router.vm.hostname = "router"
router.vm.network "private_network", ip: "192.168.1.1",
router.vm.network "private_network", auto_config: false,
virtualbox__intnet: "client_router"
router.vm.network "private_network", ip: "30.0.0.150",
router.vm.network "private_network", auto_config: false,
virtualbox__intnet: "router_inet"
router.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y dnsmasq iptables-persistent
sudo cp /vagrant/router/router.conf /etc/network/interfaces.d/
sudo ifup -a
sudo cp /vagrant/router/rules.v4 /etc/iptables/
sudo /etc/init.d/netfilter-persistent restart
sudo cp /vagrant/router/dhcp.conf /vagrant/router/dns.conf /etc/dnsmasq.d/
sudo /etc/init.d/dnsmasq restart
sudo cp /vagrant/router/rc.local /etc/
sudo chmod a+x /etc/rc.local
sudo /etc/rc.local
SHELL
end
......@@ -99,7 +104,9 @@ Vagrant.configure("2") do |config|
# .vmdk can wrap a raw image, so no need to copy to .vdi:
# VBoxManage internalcommands createrawvmdk -filename test.vmdk -rawdisk raw.img
client.vm.provision "shell", inline: <<-SHELL
sudo cp /vagrant/inet/pebble/pebble.minica.pem /usr/local/share/ca-certificates/pebble.minica.crt
while [ ! -f /usr/local/share/ca-certificates/fakeroot.crt ]; do
sudo wget --timeout 3 https://acme-v02.api.letsencrypt.org:15000/roots/0 -O /usr/local/share/ca-certificates/fakeroot.crt
done
sudo update-ca-certificates
#XXX Install selenium/chromedriver/any other deps.
......
auto eth1
iface eth1 inet static
address 30.0.1.9
netmask 255.255.255.0
post-up ip route add 30.0.0.0/16 via 30.0.1.1
{"server": "mail.boundery.org", "user": "mailuser", "password": "mailpw"}
#!/bin/bash
ip route add 30.0.0.0/16 via 30.0.1.1
#/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate protects this from eth0 dhcp renew.
echo "nameserver 30.0.1.1" > /etc/resolv.conf
{"private": "6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe", "public": "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI"}
#!/bin/bash
ip route add 30.0.0.0/16 via 30.0.0.1
sysctl net.ipv4.ip_forward=1
sysctl net.ipv6.conf.all.forwarding=1
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
post-up sysctl net.ipv4.ip_forward=1
post-up sysctl net.ipv6.conf.all.forwarding=1
auto eth2
iface eth2 inet static
address 30.0.0.150
netmask 255.255.255.0
post-up ip route add 30.0.0.0/16 via 30.0.0.1