Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get actual IP address instead of Egress or Public IP for the client in my confluence plugin?

Karan Sehgal February 1, 2024

We are trying to implement IP based access in one of the custom plugins that we developed. The issue is that since confluence is hosted on Azure, it only gets to see the public IP of the company network instead of the actual client IP.

I was wondering if there is a way to retrieve the actual client IP from the request object in confluence that can be accessed by custom plugin? Or if there is any approach that can be followed to retrieve this info from within confluence.

All I need is to pass this information to the custom plugin that can perform the access verification based on client IP. Any example will be of great help. 

 

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2024

Welcome to the Atlassian Community!

There is not usually any way to do this, the request will not contain the originating IP address, and it's often useless data anyway.

There are three reasons -

  • Most clients are sitting behind Network Address Translation systems (NAT makes it look like they are all on the same IP address, hence the public IP of the company)
  • Most clients are likely to have got their address from DHCP, which means the address can change
  • Client IPs are not unique.  I can guarantee you that there are hundreds of thousands of devices with an IP of 192.144.1.86 like mine.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events