WAF : forward client IP and port by http header

0

Hi ,

I want to use WAF to protect my application but I need to get client's IP and port for my application to work. I know that I can use X-Forwarded-For (XFF) header to get the client's IP but for port, I don't see any options for that. Would advice if there is any way for me to get the client Port data ? Many many thanks.

2개 답변
1
수락된 답변

yes it is related with which WAF are you using for example

In AWS WAF, when used with an Application Load Balancer, there is an attribute called routing.http.xff_client_port.enabled. When set to true, this attribute allows the X-Forwarded-For header to preserve the source port that the client used to connect to the load balancer. By default, this attribute is set to false​0\n\nIndicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer. The possible values are true and false. The default is false","pub_date":null}}​.

If you need to forward the client port to your application, you should set this attribute to true. This will cause the Application Load Balancer to include the client's source port in the X-Forwarded-For header, which can then be read by your application.

profile picture
전문가
답변함 일 년 전
0

This would depend on the underlying service calling WAF, rather than WAF itself. For example, for CloudFront, you could use the CloudFront-Viewer-Address header

AWS
전문가
Paul_L
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠