How Do You Find the Web UI of a GitLab Server on Your Network?

Problem scenario
You inherited a GitLab server on your network to manage. You want to find the front end of the URL. What should you do?

Solution
Find the external IP address. Log into the back-end. If it has access to the internet, run this command: curl icanhazip.com

If you have no access to the internet, run this command: ip addr show

Use the IP addresses exhaustively in a web browser with a port in this fashion (where ppp should be replaced with the port number you want to try): http://x.x.x.x:pppp

The port number may be one to five numbers long. To find the potential port, use this command:

sudo netstat -anlp | grep -i listen | grep nginx

Try the port numbers you see (but not their IP addresses, e.g., "0.0.0.0").

So if the external IP address of the GitLab server, as determined by the curl icanhazip.com, is 1.2.3.4, and the netstat command above returned "0.0.0.0:444" (among other output), construct this as the URL:

http://1.2.3.4:444

#The port above is obtained from the netstat command. The IP address above is obtained from the curl command.

Leave a comment

Your email address will not be published. Required fields are marked *