title: GitLab ssh over cloudflare and proxy
body: <p>I have installed gitlab on lxc container in a proxmox.</p>
  
  <p>It works like <code>gitlab</code>&lt;-><code>proxy</code>&lt;-><code>cloudflare</code>.</p>
  
  <p>Everything works fine except SSH clone/push/pull, BUT, if I'll add an entry to the <code>/ets/hosts</code> (on the local machine or any other server where im using gitlab) line my public IP of the <code>proxy</code> and domain name of my gitlab - its OK.</p>
  
  <p><code>proxy</code> VM is lxc container too. There im just redirecting 22 port to <code>gitlab</code> VM with a rule</p>
  
  <pre><code>-A PREROUTING -d AAA.AAA.AAA.AAA/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.10.150:22
  </code></pre>
  
  <pre><code>ssh -T git@git.MYHOST
  </code></pre>
  
  <p>this works with entry in <code>hosts</code> file. But if remove - its not working.</p>
  
  <p>ERRORS:</p>
  
  <pre><code># git pull
  
  ssh: connect to host git.peacedata.su port 22: Network is unreachable
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p><strong>UPD on 24.04.2020</strong></p>
  
  <p>I found out, that Cloudflare blocks 22port.
  I have some workaround, but I need most "beautiful" solution)).</p>