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

Posted on 159 views

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:

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

Menu-Admin-1-1024x415

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

Settings-Network-1-1024x472

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

Outbound-requests-expand-1024x359

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-1024x452

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.

coffee

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.