【发布时间】:2020-08-07 01:17:22
【问题描述】:
我已经在 proxmox 中的 lxc 容器上安装了 gitlab。
它的工作方式类似于gitlabproxycloudflare。
除了 SSH 克隆/推送/拉取之外,一切正常,但是,如果我将一个条目添加到 /ets/hosts(在本地机器或我使用 gitlab 的任何其他服务器上)行我的公共 IP 的 @987654325 @ 和我的 gitlab 的域名 - 没关系。
proxy VM 也是 lxc 容器。我只是使用规则将 22 端口重定向到 gitlab VM
-A PREROUTING -d AAA.AAA.AAA.AAA/32 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.10.150:22
ssh -T git@git.MYHOST
这适用于hosts 文件中的条目。但如果删除 - 它不起作用。
错误:
# 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.
2020 年 4 月 24 日更新
我发现 Cloudflare 阻止了 22port。 我有一些解决方法,但我需要最“漂亮”的解决方案))。
【问题讨论】:
标签: ssh gitlab cloudflare