diff --git a/access.ips b/access.ips index 0e75ef97d9b0895d7353de06749a5278246daef1..a8cf1ea0ee61974d0893aed839777135ad8404bf 100644 --- a/access.ips +++ b/access.ips @@ -1,50 +1,48 @@ +# These are IP addresses and Networks that will be used to build access lists for services +# Nework 172.22.0.0/16 is internal network of the docker. if you want the services to be accessible from other/external networks you will need to put coresponding network address to each and every service you want to be accessible from this networks +# For example 0.0.0.0/0 enables access from whole IPv4 internet and ::/0 enables access from whole IPv6 + ### HAProxy Stats - Start ### -172.22.0.0/16 +#172.22.0.0/16 ### HAProxy Stats - End ### ### Nifi Management - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### Nifi Management - End ### ### Nifi ports - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### Nifi ports - End ### ### ODFE - Start ### -172.22.0.0/16 +#172.22.0.0/16 ### ODFE - End ### ### KeyCloak - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### KeyCloak - End ### ### TheHive - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### TheHive - End ### ### Cortex - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### Cortex - End ### ### MISP - Start ### -172.22.0.0/16 0.0.0.0/0 ::/0 ### MISP - End ### diff --git a/configure.sh b/configure.sh index 1533ed66f9d82a4b8661b6317d5a301d0064a692..626adc93f09c33ba3d14d7291f3639950be4a33c 100755 --- a/configure.sh +++ b/configure.sh @@ -1,5 +1,6 @@ #!/bin/bash set -e +clear wait () { secs=${1} @@ -10,13 +11,15 @@ wait () { done } -echo "By default, all services except HAProxy stats and ODFE are public! Do you want to modify accesses to the services?" +echo "By default, all services except HAProxy stats and ODFE are public!" +echo "The configuration file: access.ips is used to configure external access to the services" +echo "Do you want to modify/edit this file now?" read -p "(yes|no) [no] : " MODIFY MODIFY=${MODIFY:-no} case $MODIFY in yes|Yes|YES ) echo modify - echo "please enter(command) which editor want to use for modification(it should be installed already and you should be able to use it)" + echo "please enter(command) which editor you want to use for editing this file" read -p "[vi] : " EDITOR EDITOR=${EDITOR:-vi} if [[ ( $EDITOR = "vi" ) || $EDITOR = "vim" ]]; then @@ -26,7 +29,7 @@ case $MODIFY in echo -e "\t 2. modify file based on your needs" echo -e "\t 3. to save changes use followng sequence: 'Esc : wq' and press enter" echo "to discurd changes, use: 'Esc : q!' and press enter" - wait 15 + read -p "press enter to continue ..." CONTINUE $EDITOR access.ips else echo "$EDITOR not found. install it and start over" @@ -46,7 +49,6 @@ case $MODIFY in ;; * ) echo "Unknown answer, not modifing access rules!" - wait 5 ;; esac @@ -56,7 +58,7 @@ if [ $? -gt 0 ]; then exit 1 else echo "access restrictions configured successfully" - wait 5 + echo "" fi @@ -65,11 +67,8 @@ if [ -f group_vars/all/variables.yml ]; then cat group_vars/all/variables.yml else echo "set FQDN which will be used to access the soctools services. (the DNS record should already be in place.)" - read -p 'soctoolsproxy: ' soctoolsproxy - if [ -z $soctoolsproxy ]; then - echo "Error: Empty string for soctoolsproxy! exiting..." - exit 1 - fi + read -p "[$(hostname -f)]: " soctoolsproxy + soctoolsproxy=${soctoolsproxy:-$(hostname -f)} echo echo "Organization's top level domain (will be used as organization name and organization domain in different services)" read -p 'domain: ' domain @@ -87,7 +86,8 @@ else echo "DN - Distinguished Name of the user, for user certificate" echo "CN - Common Name of the user, for user certificate" echo "Email will be generated automatically in Username@Domain format becouse of format restrictions in some services" - wait 10 + echo "" + echo "" for i in firstname lastname username; do read -p "${i}: " $i if [ -z $i ]; then @@ -101,7 +101,6 @@ else echo echo echo - wait 2 echo "Please check the gethered variables and type 'yes' if everything is correct: " echo "soctoolsproxy: $soctoolsproxy" echo "domain: $domain" @@ -112,7 +111,6 @@ else echo "CN: $CN" echo echo - wait 10 read -p "Correct? type 'yes' or 'no': " ANSWER if [ $ANSWER = "yes" ]; then if ! [ -f group_vars/all/variables.template ]; then @@ -132,7 +130,8 @@ else echo echo echo "variables file generated (group_vars/all/variables.yml)" - wait 2 + echo "We have configured for you following config files: access.ips, group_vars/all/variables.yml and we have also generated HAProxy Access Control Lists in the following directory: roles/haproxy/files" + echo "" echo "move to next command to deploy the soctools cluster." echo 'Thank You!' fi