ALB는 대상 응답에 서버 헤더가 없는 경우에만 awselb/2.0 값을 갖는 서버 헤더 정보를 추가한다.
이 때 서버 헤더를 비활성화(enabled false)할 경우, 헤더 정보를 추가하지 않도록 설정하여 awselb/2.0과 같은 서버 정보가 노출되는 것을 방지할 수 있다.
→ 자동 스캐닝 도구나 공격자가 특정 서버 소프트웨어에서 발견된 취약점을 악용하는 것을 방지한다.
while true; do
echo "============= $(date '+%Y-%m-%d %H:%M:%S') ============="
curl -k -I -w "time: %{time_total}s\n" https://ALB-1234567890.us-east-1.elb.amazonaws.com
echo "====================================================="
sleep 1
done
ALB server response header 설정(save changes) 후 적용되기까지 10초 정도 소요
- 리스너 단위 설정, Edit listener attributes
=====================================================
============= 2025-05-19 16:50:52 =============
HTTP/2 503
server: awselb/2.0
date: Mon, 19 May 2025 07:50:53 GMT
content-type: text/html
content-length: 162
time: 0.582316s
=====================================================
============= 2025-05-19 16:50:54 =============
HTTP/2 503
date: Mon, 19 May 2025 07:50:55 GMT
content-type: text/html
content-length: 162
time: 0.599829s
=====================================================
true: server header on
false: server header off
aws elbv2 modify-listener-attributes \
--listener-arn ARN \
--attributes Key="routing.http.response.server.enabled",Value=false
References:
[1] Application Load Balancer에 대한 HTTP 헤더 수정 - 헤더 비활성화 - https://docs.aws.amazon.com/ko_kr/elasticloadbalancing/latest/application/header-modification.html#disable-header
[2] AWS Application Load Balancer introduces header modification for enhanced traffic control and security - https://aws.amazon.com/about-aws/whats-new/2024/11/aws-application-load-balancer-header-modification-enhanced-traffic-control-security/
[3] Securing your web applications and optimizing their performance with AWS Application Load Balancer - https://aws.amazon.com/blogs/networking-and-content-delivery/securing-your-web-applications-and-optimizing-their-performance-with-aws-application-load-balancer/?nc1=h_ls
'Networking > AWS' 카테고리의 다른 글
[AWS] Direct Connect 설정 (0) | 2025.05.19 |
---|---|
[AWS] EC2 SSM Agent connection lost (0) | 2025.05.12 |
BIND server 구성 (0) | 2025.04.17 |
[AWS] 사설 인증서 생성 및 등록 (0) | 2025.04.16 |
[AWS] Create an IPAM pool with accounts in an organization (0) | 2025.04.10 |