Hi Bitbucket community,
I hope you're all doing well! I'm currently working on setting up an Azure VM as a runner in Bitbucket for infrastructure provisioning, and I'm running into a bit of a roadblock with understanding the network configuration.
I've already checked the https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/ to configure my corporate firewall, but I'm unsure about the IP addresses and ports needed for communication between Bitbucket and my Azure VM runner.
In simple terms, can anyone guide me on which IP addresses and ports I should open in Bitbucket to allow communication with my Azure VM runner? I want to make sure that the two can talk to each other smoothly.
Any help or advice would be greatly appreciated!
Thanks in advance!
Hi Wajid and welcome to the community!
The IPs you need to whitelist depend on what exactly you need to do on this server with Bitbucket Cloud.
If you want to clone or push to Bitbucket Cloud repositories, or run API calls, you need to whitelist the IP addresses listed in the section Valid IP addresses for bitbucket.org, api.bitbucket.org, and altssh.bitbucket.org on the page you linked.
If you run Pipelines builds on Atlassian infrastructure and you want the Pipelines build to communicate with your server, then you will need to whitelist the IP addresses listed in the section Valid IP addresses for Bitbucket Pipelines build environments.
If you want to set up a webhook in one of your repos so that Bitbucket Cloud sends a request to your server, you will need to whitelist the IP addresses listed on the page below, section Outgoing connections:
Please note that the IPs need to be whitelisted on your server's firewall and not on Bitbucket Cloud. In case you are on the Premium plan and you are using the Allowlisting IP addresses feature to control which IP addresses can access your Bitbucket Cloud workspace, then you will need to allowlist in your Bitbucket workspace your server's public IP addresses.
The ports Bitbucket uses are also mentioned on the page you shared, it uses the standard ports for HTTP/HTTPS/SSH which are 80/443/22.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.