M
M
midia212021-12-08 11:18:38
go
midia21, 2021-12-08 11:18:38

Go get - connection refused, what ports to open?

We set the task to develop a project for one company. Under some circumstances, development can only be done on their dedicated virtual server. On the server, all requests to the outside are closed)) You can open certain ports to certain ip only by submitting a request to the security department. The project is in golang - so you need the ability to download dependencies via github / gitlab, which ports need to be opened? It seems that they opened 80 and 443, but the dependencies are not downloaded exactly ((

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2021-12-08
@ky0

In addition to HTTP(S), you need to somehow resolve the hosts from which the download is supposed to be - this is also, at least, DNS.
In general, in a good way, it's none of your business to figure out what is missing. A normal IS department should understand tasks formulated in human language, like "I need to be able to download information from the Internet via HTTP, specifically - dependencies for a project from repositories."

U
uvelichitel, 2021-12-09
@uvelichitel

Go get uses git under the hood.
git can use as a transport:

  • http-80
  • https-443
  • native git protocol - 9418
  • ssh - default 22, but often changed to custom for security (for example 2222)

To communicate with the git and ssh protocols, you still need to have a pair of rsa keys - private on your own and public on the git server.

R
Roman Mirilaczvili, 2021-12-11
@2ord

This is the wrong approach from the point of view of information security and software deployment.
To access the destination server on Linux and deploy new versions on it, you only need an open port for SSH, and not necessarily 22. And you need to build applications on a separate build server (it’s not good to clog production with all sorts of build systems). This is called CI/CD . Well, or, at least, collect on your computer, where at least all ports are open.
When using external repositories, downloading build artifacts like Docker Hub or AWS ECR also requires an open port outside 443 on the repository.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question