Accessing Jenkins on Mac OS X from another machine
Here's how to connect to a Jenkins instance on Mac OS X from outside your router, although it's probably very similar on another OS like Windows or Linux.
Give your Jenkins machine a static IP address in Settings. We'll refer to it as
jenkins_machine_static_ip
for the purposes of these instructions:- Go to Settings > Network > Advanced... > TCP/IP
- Copy the IPv4 Address (it'll be your
jenkins_machine_static_ip
), and also copy the Subnet Mask, & Router - Select Configure IPv4 > Manually
- Fill in copied info and select 'OK'
In your router's admin panel, assign the same
jenkins_machine_static_ip
to the Mac Address of your Jenkins machine.Access to the router admin panel depends on your router.
You can find your Mac Address on your Jenkins machine as follows:
- Go to Settings > Network > Advanced... > Hardware
Configure the Jenkins URL as
http://jenkins_machine_static_ip:pick_a_port
, wherejenkins_machine_static_ip
is the same one from steps 1&2 andpick_a_port
is any unused port.- The Jenkins URL can be configured in your Jenkins web portal by following this path:
Jenkins > Manage Jenkins > Configure System > Jenkins Location - See the image in the original question.
- The Jenkins URL can be configured in your Jenkins web portal by following this path:
- Set up port forwarding on your router by picking an arbitrary router port (we'll call it
router_forwarded_port
) and forwarding it tohttp://machine_static_ip:pick_a_port
, which you set up in #3.
You can now access your Jenkins instance from outside the network by accessing your router's IP and the forwarding port. You can get your router's external IP address here: Router_IP
The address you need to connect to is: Router_IP:router_forwarded_port/