title: Haproxy config for bitbucket server
body: <p>I am using haproxy for port forwarding to Bitbucket server ssh. Here's haproxy config:</p>
  
  <pre><code>frontend sshd
          bind *:7999
          default_backend ssh
          timeout client 1h
  
  backend ssh
          mode tcp
          server localhost-bitbucket-ssh 127.0.0.1:7999 check port 7999
  </code></pre>
  
  <p>However if i do:</p>
  
  <pre><code>sudo haproxy -f haproxy.cfg
  </code></pre>
  
  <p>i am getting the following error:</p>
  
  <pre><code>[ALERT] 305/201411 (4168) : http frontend 'sshd' (haproxy.cfg:38) tries to use incompatible tcp backend 'ssh' (haproxy.cfg:43) as its default backend (see 'mode').
  [ALERT] 305/201411 (4168) : Fatal errors found in configuration.
  </code></pre>
  
  <p>But i was referring to an official atlassian guide: <a href="https://confluence.atlassian.com/bitbucketserver/setting-up-ssh-port-forwarding-776640364.html" rel="nofollow noreferrer">https://confluence.atlassian.com/bitbucketserver/setting-up-ssh-port-forwarding-776640364.html</a> are they wrong?</p>
  
  <p>Also if i start haproxy before bitbucket server, bitbucket server cannot start on port 7999. I am totally confused. I have paid for that software and now i need to figure it out myself how to configure it for more than 2 days...</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>It was UFW as Thomj mentioned. But for what purposes do i need haproxy? If i can't bind Bitbucket's ssh to 22 port? I don't like to set port number.</p>