Friday, November 22, 2024
Google search engine
HomeData Modelling & AIResolve “Url is blocked: Requests to the local network are not allowed”...

Resolve “Url is blocked: Requests to the local network are not allowed” GitLab Error

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

After upgrading GitLab, you may encounter the error “Url is blocked: Requests to the local network are not allowed” as illustrated in the screenshot below while trying to create triggers to your Jenkins instance.

Request to the local network are not allowed error

If you have, then chill out and follow the steps below. It is a security feature that blocks all traffic in GitLab unless you explicitly allow where to or from. At the end of the day, it is a pretty cool feature.

Now, to enable egress and ingress traffic for example to send a Webhook trigger to Jenkins server, do the following:

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

Login to GitLab with an account having administrative capabilities or privileges then navigate as follows. Click on “Menu” > “Admin“.

Menu Admin 1

On the new page, hover over or click “Settings” then hit “Network“.

Settings Network 1

When the new page loads, look for “Outbound requests“. On the far right of this field, click on “Expand“.

Outbound requests expand

Once Outbound requests field is expanded, you will see a field against a radio button that reads, “Allow requests to the local network from web hooks and services“. Click on the radio button to enable it as shared in the illustration below.

Outbound Requests ip details filled

After that, in the text area titled, “Allow requests to the local network from web hooks and services“, add the various IP addresses or domain names of your Jenkins servers as shown in the screenshot above. Use comma, semicolon, or newline to separate multiple entries.

Lastly, once all of your details are well done, click on save changes to make your new configurations persistent. And we should be good to go. You can go to your webhooks and send a test and verify that the error has disappeared.

That is all guys!!

Concluding Remarks

We hope the guide worked for you and your triggers to Jenkins begun working once again as you desire. Thank your for following along, for reading till the end and for the tremendous support you continue to proffer us. We are eternally grateful.

Git & GitLab Learning Video Courses

Guides you can also read:

How To Integrate SonarQube with Jenkins

Configure GitLab FreeIPA LDAP Authentication

Install Saltstack Master/Minion on CentOS 8 | Rocky Linux 8

How To Use Multi-Branch Pipeline in Jenkins

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

RELATED ARTICLES

Most Popular

Recent Comments