diff --git a/main.env.sample b/main.env.sample index 90d5dab17693d3eed4a0f82204a8fe1bf44fdf8e..a801a6fa78c14674df2db774ce941bf403f7654c 100644 --- a/main.env.sample +++ b/main.env.sample @@ -8,7 +8,7 @@ export MODS="Base GlpiAgent Traefik" # Valid levels are security and upgrade export MAINTENANCE_LEVEL="security" -# TODO change domain for you domaine of server +# TODO change domain for you domain of server export DOMAIN="dev.tetras-libre.fr" # TODO change admin mail @@ -18,8 +18,8 @@ export SERVER_ADMIN="sysadmin@tetras-libre.fr" # This has the consequence of whether or not the free tetras ssh public key is added to the authorized keys export TETRAS_MAINTENACE=true -# TODO change ignore domaines for fail2ban -export IGNORE_DOMAINES=( +# TODO change ignore domains for fail2ban +export IGNORE_DOMAINS=( "tetrix.tetras-libre.fr" "piculus.tetras-libre.fr" ) diff --git a/utils/configure_base_tools.sh b/utils/configure_base_tools.sh index 622cb426710c1f9f295736dae6206b4bb7df4c26..e4b1960907b75846f5522a4d782fd2358d59bd49 100755 --- a/utils/configure_base_tools.sh +++ b/utils/configure_base_tools.sh @@ -49,12 +49,12 @@ EOF ignoreips=() -for domaine in "${IGNORE_DOMAINES[@]}"; do - # Utilise dig pour obtenir l'adresse IP - ip=$(dig +short "$domaine") +for domain in "${IGNORE_DOMAINS[@]}"; do + # Use dig to get the IP address + ip=$(dig +short "$domain") ignoreips=("${ignoreips[@]}" $ip) - # Affiche le nom de domaine et l'adresse IP - echo "$domaine : $ip" + # Displays the domain name and IP addresss + echo "$domain : $ip" done cat <<EOF > /etc/fail2ban/jail.local diff --git a/utils/getIgnoreIp.sh b/utils/getIgnoreIp.sh index f8cdad8bc616ce08d44a3493c389cec95b5fc890..1cff80a5e82047ff6447dd5e8545a0ea4fc92287 100644 --- a/utils/getIgnoreIp.sh +++ b/utils/getIgnoreIp.sh @@ -17,10 +17,10 @@ fi ignoreips=() -for domaine in "${IGNORE_DOMAINES[@]}"; do - # Utilise dig pour obtenir l'adresse IP - ip=$(dig +short "$domaine") +for domain in "${IGNORE_DOMAINS[@]}"; do + # Use dig to get the IP address + ip=$(dig +short "$domain") ignoreips=("${ignoreips[@]}" $ip) - # Affiche le nom de domaine et l'adresse IP - echo "$domaine : $ip" + # Displays the domain name and IP address + echo "$domain : $ip" done