Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
322 views
in Technique[技术] by (71.8m points)

amazon web services - Behind AWS ELB : How to grab the Real IP from "netstat"?

I'm using AWS Elastic Load Balancing (ELB) in front of 2 Linux Web Servers. But (based on my requirement) i need to know the Real IPs from the Web Servers' perspective, especially when i use netstat.

I need to know the number of incoming connections from each IPs (from NETSTAT), as in real time. So basically in Linux (without ELB in front), below netstat command perfectly works:

netstat -tn 2>/dev/null | grep :80

But now i can only see the internal IP(s) of the ELB; which is making the whole thing quite difficult.

What is the solution for this please? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You could get the client source IP from ELB Access Logs and use EMR with Hive to count the number of times a client request came in from the same IP.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...