Search code examples
jenkinsjenkins-agent

JNLP and ports to be open on Jenkins agent and firewall configuration


When connecting Jenkins controller and Jenkins agent by means of JNLP, and having a firewall in between, which port(s) do I have to declare in the firewall to be kept open?

For Jenkins controller:

  • 443 (the Jenkins controller is available via https)
  • 9999 (fixed configured in my Jenkins controller in 'TCP port for JNLP agents')

For Jenkins agent:

Which port has to be open for Jenkins master to be able to access Jenkins agent?


Solution

  • When connecting Jenkins master and slave/agent via JNLP, the agent is the one who will establish communication with the master. It's ideal if the agent(s) are behind a firewall or in a private network that doesn't allow incoming connections.

    Which port has to be open for Jenkins master to be able to access Jenkins agent?

    None, just be sure that the TCP port for JNLP is open on the master (port 9999 in your case)