You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.5 KiB

#!/usr/bin/env bash
set -eu
netLocal="192.168.2."
netDMZ="192.168.3."
build() {
local n
for n in distributeur client comanche castafiore appolo passerelle darkside brightside; do
vdn-build $n
vdn-config $n MODE "tgz2"
vdn-config $n HDA "DebianBullseye.disk"
vdn-config $n GUEST_SYS "debian/bullseye"
vdn-config $n MEMORY "384"
vdn-config $n EXTRA_ETH_DEFAULT_ROUTE 0
vdn-config $n SET_PROXY "0"
done
# local
n=distributeur
vdn-config $n NETWORKS "NET_1#192.168.2.2/24"
vdn-config $n EXTRA_SERVICES "ssh isc-dhcp-server"
vdn-config $n POST_BOOT '[ -e /etc/start ] && { echo Run /etc/start >&2 ; . /etc/start & }'
n=client
vdn-config $n EXTRA_SERVICES "ssh"
vdn-config $n NETWORKS "NET_1#192.168.2.3/24"
n=comanche
vdn-config $n EXTRA_SERVICES "apache2"
vdn-config $n NETWORKS "NET_1#192.168.2.4/24"
vdn-config $n REDIRS "tcp:22:(ssh) tcp:80:(http)"
# DMZ
n=castafiore
vdn-config $n EXTRA_SERVICES "apache2"
vdn-config $n NETWORKS "NET_2#192.168.3.3/24"
vdn-config $n REDIRS "tcp:22:(ssh) tcp:80:(http)"
n=appolo
vdn-config $n NETWORKS "NET_2#192.168.3.2/24"
# Gateway
n=passerelle
vdn-config $n NETWORKS "NET_G#W3.X3.Y3.Z3/8 NET_1#192.168.2.1/24 NET_2#192.168.3.1/24"
# Externe (Internet)
n=darkside
vdn-config $n NETWORKS "NET_G#W1.X1.Y1.Z1/8"
vdn-config $n EXTRA_SERVICES "apache2"
vdn-config $n REDIRS "tcp:22:(ssh) tcp:80:(http)"
n=brightside
vdn-config $n NETWORKS "NET_G#W2.X2.Y2.Z2/8"
vdn-config $n EXTRA_SERVICES "apache2"
vdn-config $n REDIRS "tcp:22:(ssh) tcp:80:(http)"
}