Application Link configuration from Jira to Confluence fails with URL must not point to localhost or restricted IPs

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

Summary

Application link creation fails when Confluence and Jira are running on the same Server.

Environment

  • Jira 9.13.x onwards
  • Confluence 8.4.x  onwards
  • AppLink 9.1.x onwards

Diagnosis

Creating AppLink from Jira to Confluence or vice-versa fails with the error in UI: Unable to create link. URL must not point to localhost or restricted IPs.



Cause

With AppLink 9.1.x there is a restriction when trying to configure the Application Link between Confluence and Jira hosted on the same machine. Application Link version history corresponding to Confluence and Jira can be here - AppLinks versions by product

The purpose of this restriction is to protect against possible Server-Side Request Forgery (SSRF) attacks. 


Solution

To create the Application Link between Confluence and Jira hosted on the same machine, the workaround is to add the following JVM argument in both the Applications(Jira and Confluence)

-Dapplinks.allow.all.hosts=true

Be sure that you are familiar with what Server-Side Request Forgery (SSRF) attacks are and weigh the potential risk against the benefit before changing this property.

Refer to Setting properties and options on startup for more details on how to update the above values in the startup option, Steps are outlined below for quick reference.



Linux Platform

Click here to expand...
  • Go to <Install_dir/atlassian/jira/bin
  • Edit the file setenv.sh
  • Look for JVM_SUPPORT_RECOMMENDED_ARGS="" and add the paramter -Dapplinks.allow.all.hosts=true
  • Restart of Jira Service would be required.


Windows Platform

If running Jira via .bat files on Windows
  • Go to <install_dir/Program Files/Atlassian/Jira>
  • Edit or open setenv.bat with Notepad or any other editing tool.

  • Look up for the  JVM_SUPPORT_RECOMMENDED_ARGS=""

  • Add the parameter -Dapplinks.allow.all.hosts=true

  • Restart Jira from command prompt with Admin privileges.
Expand to see Windows service instructions
  • Go to Services console on Windows Server
  • Or Press Windows key + R and type services.msc
  • Look up Jira Service. Once found double click on it.
  • Copy the name of Atlassian Jira Service.
  • Now open command prompt with Administrator Privileges from start menu on Windows.
  • Set the path on the command prompt to <install_dir/Program files/Atlassian/Jira/bin>
  • Type the command tomcat9w //ES//<Jira_service_name>
  • This will open a applet. Go to Java tab.
  • Go to Java options and add the parameter -Dapplinks.allow.all.hosts=true 
  • Restart Jira Service from Services.msc



Last modified on Aug 20, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.