使Jenkins对远程用户不可见 [英] Make Jenkins invisible to remote users

查看:161
本文介绍了使Jenkins对远程用户不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地Windows设备上有一个Jenkins服务器,但我想使其对外界不可见(有关服务器的办公规则).一种令人满意的工作方式是显而易见的,微妙的方法,它是设置防火墙规则以阻止对其端口的传入访问,但是我认为必须有一个Jenkins设置来阻止它向除本地主机之外的任何人发布其服务.谁能告诉我是否有?

I have a Jenkins server on my local Windows device, but I want to make it invisible to the outside world (office rules regarding servers). The obvious and unsubtle way, which works satisfactorily, is to set up a firewall rule to block incoming access to its port, but I feel there must be a Jenkins setting to stop it advertising its services to anyone but localhost. Can anyone tell me if there is?

请注意,设置用户凭据不是有效的解决方案,因为服务器可见但未经登录便无法访问,这仍然违反了办公规则.

Note that setting up user credentials is not a valid solution, as the server being visible but inaccessible without login still violates office rules.

推荐答案

来自

From Starting and Accessing Jenkins you need --httpListenAddress=127.0.0.1 command line parameter:

-httpListenAddress = $ HTTP_HOST-将Jenkins绑定到$ HTTP_HOST表示的IP地址.默认值为0.0.0.0,即在所有可用接口上进行监听. 例如,要仅侦听来自本地主机的请求,可以使用:--httpListenAddress = 127.0.0.1

--httpListenAddress=$HTTP_HOST - Binds Jenkins to the IP address represented by $HTTP_HOST. The default is 0.0.0.0 — i.e. listening on all available interfaces. For example, to only listen for requests from localhost, you could use: --httpListenAddress=127.0.0.1

如果您将Jenkins作为Windows服务运行,则可以在Jenkins主目录的jenkins.xml文件中扩展命令行参数.

If you run your Jenkins as Windows service, you can extend command line arguments in jenkins.xml file in Jenkins home directory.

类似于ServerFault上的 answer (对于面向Linux的平台).

Similar answer (for Linux-oriented platforms) on ServerFault.

这篇关于使Jenkins对远程用户不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆