Limited HTTPS jira port list - is there any workaround?
Asked by kkundera:

Hello,

I am integrating Jira cloud instance with my custom application that is behind a firewall.  
My issue is that I cannot use custom ports for HTTPS REST traffic outgoing from jira.

First, I opened network traffic for ips from <https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections>

Then I created an example automation rule with a single action (send web request) to test the connection. Test failed to reach the firewall and after looking at the response it seems this was due to being stopped at Squid proxy located inside Jira cloud network.

Error response HTTP body:  
\<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "<http://www.w3.org/TR/html4/strict.dtd>"\> \<html\>\<head\> \<meta type="copyright" content="Copyright (C) 1996-2022 The Squid Software Foundation and contributors"\> \<meta http-equiv="Content-Type" content="text/html; charset=utf-8"\> \<title\>ERROR: The requested URL could not be retrieved\</title\> \<style type="text/css"\>\<!-- /\* \* Copyright (C) 1996-2022 The Squid Software Foundation and contributors \* \* Squid software is distributed under GPLv2+ license and includes \* contributions from numerous individuals and organizations. \* Please see the COPYING and CONTRIBUTORS files for details. \*/ /\* Stylesheet for Squid Error pages Adapted from design by Free CSS Templates <http://www.freecsstemplates.org> Released for free under a Creative Commons Attribution 2.5 License \*/ /\* Page basics \*/ \* { font-family: verdana, sans-serif; } html body { margin: 0; padding: 0; background: #efefef; font-size: 12px; color: #1e1e1e; } /\* Page di...

After some searching, I found that only a few ports seem to be available for use. <https://jira.atlassian.com/browse/AUTO-151>

I wanted to use port 8500 for my sandbox environment and port 8600 for my production environment, but obviously I need to change my approach if the amount of available ports is limited. Only solution from my perspective is to use one of the ports given in AUTO-151 and hope I don't have to integrate another cloud system that would collide on port with this one.  
Is there any way to use my ports for traffic outgoing from jira, for example if I write my own app in jira? Do you know of any workaround or a better solution than mine?


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

As a web service, Jira only runs on one standard port.

Why do you think you want to use other ports?

comments: author: kkundera
body: Hello, thank you!

Maybe my explanation was not clear.

I would like to run two instances of jira - sandbox and production. I would like to send data from jira sandbox to my custom application that is behind a firewall, lets say <https://myapplication.com/rest/>, using REST with port 8500, and from jira production to <https://myapplication.com/rest/> using REST with port 8600.

Both jira sandbox and jira prod are on cloud and because of this they share the possible ip pool.

There are two different destination ports used here, so that firewall on my custom application can direct the sandbox jira data to my custom sandbox application, and prod jira data to my custom prod application.


author: Nic Brough -Adaptavist-
body: Ah, ok, not trying to run Jira on two different ports, but trying to run two systems on different ports.

I assume you are running Server or Data-center installations of Jira for the two systems, not Atlassian Cloud (because you won't be able to change ports on Cloud)

To change the ports on a server or DC install, look at the Tomcat's server.xml, and edit the port that each one is serving on (just needs a restart after changing the number, no need for indexing or anything else)

However, there should probably not be any need to do that - you could look at the urls instead of the ports.


author: kkundera
body: Hello,

Yes, I am running two instances but on cloud, and the problem is communication outgoing from cloud.  
I had this simple automation rule set up:

![jiratest.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/305433i26F3409722C89786/image-size/large?v=v2&px=999 "jiratest.PNG")

and this is the result:

![jiratest2.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/305434i055D1FE6182330E8/image-size/large?v=v2&px=999 "jiratest2.PNG")

Official info from [here \[AUTO-151\]](https://jira.atlassian.com/browse/AUTO-151) is:

The request is denied from Atlassian as the squid proxy only allows the following safe ports to be used in the destination URLs:  

```
80 8080 443 8443 8444 7990 8090 8085 8060
```

These ports are an issue to me :/ I wonder if there is any workaround


Tags: automation

https

jira-service-management

port