
[버전]
8.17.4 tar
[서버]
192.168.219.159 (master) : Elasticsearch, Kibana, Logstash, CA 인증서
192.168.219.157 (data) : Elasticsearch, Metricbeat
192.168.219.158 (data) : Elasticsearch
[root@localhost ~]# vi /etc/sysctl.conf
# sysctl.conf
vm.max_map_count=262144
vm.swappiness=1
# 커널 매개변수 적용
[root@localhost ~]# sysctl -p
vm.max_map_count = 262144
vm.swappiness = 1
vi /etc/security/limits.conf
# limits.conf
elastic soft nofile 65535
elastic hard nofile 65535
elastic soft nproc 4096
elastic hard nproc 4096
elastic soft memlock unlimited
elastic hard memlock unlimited
[root@localhost ~]# firewall-cmd --list-all # 방화벽 포트 목록 확인
firewall-cmd --permanent --add-port=9200/tcp # kibana, logstash 등이 ES와 통신 클라이언트와의 통신용
firewall-cmd --permanent --add-port=9300/tcp # 노드끼리 클러스터 통신
firewall-cmd --permanent --add-port=5601/tcp # 브라우저에서 kibana 접속
firewall-cmd --permanent --add-port=5044 # metricbeat -> logstash 데이터 수신
firewall-cmd --reload # 방화벽 설정 재로드
[root@localhost ~] su - elastic
[elastic@localhost ~]
[elastic@localhost ~]$ wget https://artifacts.elastic.co/downloads/kibana/kibana-8.17.4-linux-x86_64.tar.gz
[elastic@localhost ~]$ tar -xzf kibana-8.17.4-linux-x86_64.tar.gz
[elastic@localhost ~]$ cd kibana-8.17.4
vi config/kibana.yml
# kibana.yml
server.port: 5601
server.host: 192.168.219.159 # kibana가 설치된 서버
elasticsearch.hosts: ["https://192.168.219.159:9200"] # 보안 설정 때문에 https
[elastic@localhost kibana-8.17.4]$ nohup ./bin/kibana &
192.168.219.159:5601 로 웹 브라우저 접속[elastic@localhost elasticsearch-8.17.4]$ curl 192.168.219.159:5601
ps aux | grep kibana # kibana 실행 확인 명령어
ss -nltp | grep 5601 # 포트가 열려는지 보면 정상 실행 여부 확인 가능
Q.1 Kibana를 158 서버에 설치했을 때, server.host와 elasticsearch.hosts는 어떻게 설정해야 할까?
가정:
• Kibana 설치 서버: 192.168.219.158
• Elasticsearch 마스터 노드: 192.168.219.159```bash server.host: "192.168.219.158” elasticsearch.hosts: ["[https://192.168.219.159:9200](https://192.168.219.159:9200/)"] ```
Q2. server.host: 0.0.0.0으로 설정하면 언제 유용하고, 어떤 보안 위험이 있을까?
모든 네트워크 인터페이스에서 접근 허용. 내부/외부 누구든 이 서버의 kibana 접속 가능
✅ 유용할 때:
• 클러스터 환경에서 IP가 유동적이거나
• 여러 대에서 접근해야 할 때
• 포트포워딩, 프록시 등으로 외부에서 UI를 띄울 때
❌ 보안 리스크:
• 방화벽 설정 없으면 외부에서 아무나 접속 가능
• Brute-force 공격, 토큰 탈취 등 위험
• 반드시 firewalld 또는 NGINX reverse proxy로 접근 제어 필요
🔐 실무 팁:
• 내부 전용이면 IP 지정 (server.host: "192.168.219.158")
• 외부 노출이면 server.host: 0.0.0.0 + 방화벽/IP 제한/프록시 필수
Q3. ss -nltp vs ss -nltp | grep 5601 차이
🔹 ss -nltp
- 시스템에서 LISTEN 중인 모든 TCP 포트를 보여줌(전체포트)
- 각각의 프로세스가 어떤 포트를 쓰고 있는지 확인
🔹 ss -nltp | grep 5601- 위 출력 중에서 특정 포트(5601)만 필터링해서 보여줌(kibana 포트 확인)
- Kibana가 제대로 포트를 열고 있는지 빠르게 확인할 때 사용