Make Jenkins invisible to remote users

戏子无情 提交于 2019-12-22 09:47:56

问题


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.


回答1:


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

--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

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

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



来源:https://stackoverflow.com/questions/31779993/make-jenkins-invisible-to-remote-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!