Whenever an email is sent to somebody, a header is attached to it by the application that send the email. This header contains important information about the sender and the receiver and many other information such as what path this email may take to reach its destination.Since this header contains information about the sender as well, it is very easy to find the sender’s IP address using the email header.
So how to find the IP address of the sender in Gmail?
- Login to Gmail using your id and password.
- Open the mail of the sender whose IP you want to determine.
- Click on the inverted triangle placed near the Reply button and click on Show Original
- A new window will open with the complete header in it. But we are interested only in finding the IP address of the sender. So now look for Received:from followed by the IP address within square brackets [ ] e.g. Received: from sachin.i-tendulkar.com (sachin.i-tendulkar.com [18.104.22.168]). This(22.214.171.124) is the IP address of the sender.
- Sometimes while looking in the email header, you will notice that there are many Received: from entries. If this is the case then the last such entry should be considered as the IP of the sender.
Now that you have got the IP address of the sender, what you can do with it? Try finding the physical location of the IP address using the hacktrix app Get Location from IP Address on Google Map.
Important note – If someone is using Gmail to send you the email then the above trick will not work. To understand why, read the following comment from Google,
User IP addressesProtecting our users’ privacy is something we take very seriously. Personal information, including someone’s exact location, can be gathered from someone’s IP address, so Gmail doesn’t reveal this information in outgoing mail headers. This prevents recipients from being able to track our users, or uncover what may be potentially sensitive personal information.
Don’t worry — we aren’t enabling spammers to abuse the system by not revealing IP addresses. Gmail uses many innovative spam filtering mechanisms to ensure that spammers have a difficult time sending bulk emails that arrive in users inboxes.
If you know any other method to get IP of sender or a way to find the IP of senders who are using gmail then please do share it with us using comments.