How to get the remote client IP address?

How to get the remote client IP address?

func (c echo.Context) error {
	ip := c.RealIP()
}
2 Likes

Sorry for resurrecting an old thread, but is c.RealIP() secure, aka. can’t be forged by the client? Or c.request.RemoteAddr should be used in this case?

I become totally helpless when it comes to the IP address theme. I do not understand anything about it. Where should I check it? Maybe I should ask my internet provider to reconfirm it to me. I think IP addresses do not change if I stay in the same zip code https://worldpostalcode.com/united-states/oregon/portland. Let me know if it works in a different way. Or advise where I can read more about it.

There are many APIs with the help of which you can know visitor’s IP address, approximate location, which system they’re using, which network they’re in and a lot more. You can just search online and you will find a lot of APIs to do this task. It is as simple as solving brother wireless printer offline windows 10 error.