Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket Server listen localhost only

Hi,

How can i change bitbucket server to listen localhost only: Instead of:

netstat :::7990 :::5701 :::7999,  this: 127.0.0.1:7990 127.0.0.1:5701 127.0.0.1:7999.  

Thanks!

3 answers

I need to know this too

 

Hi,

since Bitbucket is running on tomcat you only need to tell tomcat that it should accept local connections only. How do you do that?

Add address="127.0.0.1" to your connector in the server.xml located in the conf folder of your Bitbucket installation. See line 6 in the example below.

<Connector port="7990" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   compression="on"
				   address="127.0.0.1"
                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />

Please let me know if this was helpful.

0 votes

All threads I found on this topic appear to be outdated.  This was the best match for both searching google and the Atlassian community for "Bitbucket listen localhost only".  Being new here, I wasn't sure if this should be opened as a new thread in lieu of necroing this one. 

Having a local firewall to block access to unecessary interfaces is not an option.

There does not appear to be a server.xml file located on the most current release of Bitbucket, and the bitbucket.properties file contains the following at the top of the file:

#> Migrated to database at jdbc:postgresql://localhost:5432/GIT?targetServerType=master

I assume this has been moved to a Bitbucket setting from within the interface, but it is eluding me.

The following is from the page http://127.0.0.1:7990/admin/server-settings:

Bitbucket/Administration/Server Settings/Base URL is set to http://127.0.0.1:7990

Here are my listening ports for Bitbucket:

# netstat -anp | grep -iw 799.
tcp 0 0 0.0.0.0:7999 0.0.0.0:* LISTEN 2999/java
tcp 0 0 0.0.0.0:7990 0.0.0.0:* LISTEN 2999/java
tcp 0 0 127.0.0.1:7992 0.0.0.0:* LISTEN 2989/java
tcp 0 0 127.0.0.1:7993 0.0.0.0:* LISTEN 2989/java
tcp 0 0 127.0.0.1:7992 127.0.0.1:51936 ESTABLISHED 2989/java
tcp 0 0 127.0.0.1:51936 127.0.0.1:7992 ESTABLISHED 2999/java

I'd like to the top two listening on 127.0.0.1 instead of 0.0.0.0, just like the rest of them.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,564 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you