将sslh配置为与https端口

时间:2020-03-28 20:46:11

标签: ssl nginx networking

我是sslh配置的新手,但遇到了问题:

我有配置有nginx-1.16.1的fedora服务器:

  • http(80)
  • https(3000)

sslh上,我有以下配置:

listen:
(
     { host: "0.0.0.0"; port: "443"; }
);

protocols:
(
     { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; fork: true; },
     { name: "openvpn"; host: "localhost"; port: "4263"; },
     { name: "http"; host: "localhost"; port: "80"; },
     { name: "tls"; host: "localhost"; port: "3000"; log_level: 0; }
);

但是当我尝试通过systemctl status sslh上的浏览器进行连接时,我会看到下一个:

 example.com sslh[104140]: forward to tls failed:connect: Permission denied
 example.com sslh[104140]: sslh-fork.c:110:connect: Permission denied

nginx.conf(与ssl服务器一起提供):

server{
    listen 3000 ssl;
    server_name 127.0.0.1;
    ssl_certificate /var/certs/example.com.crt;
    ssl_certificate_key /var/certs/example.com.domain.key;
    ssl_ciphers     EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
    ssl_protocols   TLSv1.1 TLSv1.2;
    location / {
        return 200 "OK";
    }
}

其他服务运行良好:(我可以通过ssh端口连接到443

有人可以解释一下我吗:

  • 我错了吗?
  • 我该如何解决这个问题?

0 个答案:

没有答案