From 57fc9ae7f7b54d213b7ad5c93763e48af9696481 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sat, 27 Jun 2020 23:49:42 +0200 Subject: [PATCH] Updated initial configuration script. --- create_conf.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/create_conf.sh b/create_conf.sh index 6debf18..704c641 100755 --- a/create_conf.sh +++ b/create_conf.sh @@ -13,10 +13,29 @@ openssl x509 -req -days 3650 -CA ca.crt -CAkey ca.key -CAcreateserial -extension openssl req -nodes -new -keyout client2.key -out client2.csr -subj "/C=FR/O=scimetis/CN=serveur-appart.scimetis.net" -reqexts usr_cert -config ../openssl.conf openssl x509 -req -days 3650 -CA ca.crt -CAkey ca.key -CAcreateserial -extensions usr_cert -extfile ../openssl.conf -in client2.csr -out client2.crt +NAME=modane +openssl req -nodes -new -keyout ${NAME}.key -out ${NAME}.csr -subj "/C=FR/O=scimetis/CN=${NAME}.scimetis.net" -reqexts usr_cert -config ../openssl.conf +openssl x509 -req -days 3650 -CA ca.crt -CAkey ca.key -CAcreateserial -extensions usr_cert -extfile ../openssl.conf -in ${NAME}.csr -out ${NAME}.crt + chcon -R -u system_u -r object_r -t svirt_sandbox_file_t ./ mkdir keys mkdir ccd cp -a ca.crt ca.srl dh1024.pem server.crt server.key keys/ -echo "ifconfig-push 192.168.102.10 255.255.255.0" > "ccd/serveur.scimetis.net" -echo "ifconfig-push 192.168.102.3 255.255.255.0" > "ccd/serveur-appart.scimetis.net" + +cat < "ccd/serveur.scimetis.net" +ifconfig-push 192.168.102.10 255.255.255.0 +iroute 192.168.11.0 255.255.255.0 +EOF + +cat < "ccd/serveur-appart.scimetis.net" +ifconfig-push 192.168.102.3 255.255.255.0 +iroute 192.168.1.0 255.255.255.0 +iroute 192.168.3.0 255.255.255.0 +EOF + +cat < "ccd/modane.scimetis.net" +ifconfig-push 192.168.102.2 255.255.255.0 +iroute 192.168.43.0 255.255.255.0 +EOF + cd ..