Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We enable the possibility of registering the localhost domain in the installation assistant and in the cert-tool #2422

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions unattended_installer/cert_tool/certFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function cert_generateCertificateconfiguration() {
sed -i '/IP.1/d' "${cert_tmp_path}/${1}.conf"
for (( i=2; i<=${#@}; i++ )); do
isIP=$(echo "${!i}" | grep -P "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$")
isDNS=$(echo "${!i}" | grep -P "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\.([A-Za-z]{2,})$" )
isDNS=$(echo "${!i}" | grep -P "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$" )
j=$((i-1))
if [ "${isIP}" ]; then
printf '%s\n' " IP.${j} = ${!i}" >> "${cert_tmp_path}/${1}.conf"
Expand Down Expand Up @@ -341,7 +341,7 @@ function cert_readConfig() {

for i in $(seq 1 "${number_server_ips}"); do
nodes_server="nodes[_]+server[_]+${i}[_]+ip"
eval "server_node_ip_$i=( $( cert_parseYaml "${config_file}" | grep -E "${nodes_server}" | sed '/\./!d' | cut -d = -f 2 | sed -r 's/\s+//g') )"
eval "server_node_ip_$i=( $( cert_parseYaml "${config_file}" | grep -E "${nodes_server}" | cut -d = -f 2 | sed -r 's/\s+//g' | sed -E '/nodes_/d') )"
done

unique_names=($(echo "${indexer_node_names[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
Expand Down
6 changes: 3 additions & 3 deletions unattended_installer/config/certificate/config_aio.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
nodes:
indexer:
- name: wazuh-indexer
ip: 127.0.0.1
ip: localhost
server:
- name: wazuh-server
ip: 127.0.0.1
ip: localhost
dashboard:
- name: wazuh-dashboard
ip: 127.0.0.1
ip: localhost
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server.host: 0.0.0.0
opensearch.hosts: https://127.0.0.1:9200
opensearch.hosts: https://localhost:9200
server.port: 443
opensearch.ssl.verificationMode: certificate
# opensearch.username: kibanaserver
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wazuh - Filebeat configuration file
output.elasticsearch:
hosts: ["127.0.0.1:9200"]
hosts: ["localhost:9200"]
protocol: https
username: ${username}
password: ${password}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Wazuh - Filebeat configuration file
output.elasticsearch.hosts:
- 127.0.0.1:9200
- localhost:9200
# - <elasticsearch_ip_node_2>:9200
# - <elasticsearch_ip_node_3>:9200

Expand Down
2 changes: 1 addition & 1 deletion unattended_installer/config/indexer/indexer_all_in_one.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
network.host: "127.0.0.1"
network.host: "localhost"
node.name: "node-1"
cluster.initial_master_nodes:
- "node-1"
Expand Down