# Error app/webhook.go:110 address forbbiden

**URL:** <https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274>\
**Category:** Troubleshooting\
**Created:** [March 24, 2020, 11:00am UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274 "2020-03-24T11:00:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielha23](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@danielha23](https://forum.mattermost.com/u/danielha23)\
**Post date:** [March 24, 2020, 11:00am UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/1 "2020-03-24T11:00:21Z")

</div>

#### Summary

I am using dockers mattermost-preview image, and I am trying to connect it with a RASA bot, but when sending a message I get the following error in the log:  
{“level”:“error”,“ts”:1585045803.1958508,“caller”:“app/webhook.go:110”,“msg”:“Event POST failed.”,“error”:“Post [http://localhost:5005/webhooks/mattermost/webhook:](http://localhost:5005/webhooks/mattermost/webhook:) address forbidden, you may need to set AllowedUntrustedInternalConnections to allow an integration access to your internal network”}

I already added `localhost` to `AllowedUntrustedInternalConnections` but still keep getting this error.

In the bot server I am not receiving anything.

#### Steps to reproduce

Run dockers mattermost-preview image, set up a bot account and an outgoing webhook, declare mattermost url, bot username, token and webhook url in RASA credentials.yml file.

#### Expected behavior

I updated the config.json file and added localhost into `AllowedUntrustedInternalConnections` and I would expect to at least get a message in the RASA log, but I keep getting the address forbidden message.

#### Observed behavior

When sending a message to a group where the bot is a member using ‘@botname’ and the message I get the error message I pasted in the summary above. Also when trying to send a direct message to it I get no response or error message. I am using `https://localhost:8065/teamName/api/v4`, the name of the bot as user, the bot token and `https://localhost:8065/webhooks/mattermost/webhook` as the webhook url. For the outgoing webhook in mattermost I am using `http://localhost:5005/webhooks/mattermost/webhook`, this is the RASA server address for the bot.

---

<div class="post-metadata">

**Author:** ![marcokundt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/marcokundt/32/3693_2.png) [@marcokundt](https://forum.mattermost.com/u/marcokundt)\
**Post date:** [March 24, 2020, 11:59am UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/2 "2020-03-24T11:59:37Z")

</div>

Hey Daniel,  
can you enable insecure outgoing connections and try again? Environment -\> Webserver

 ![2020-03-24_12-57](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/b/b05300d2ba889d236cae8ea7fec90c74aa20e2f2.png)

---

<div class="post-metadata">

**Author:** ![danielha23](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@danielha23](https://forum.mattermost.com/u/danielha23)\
**Post date:** [March 24, 2020, 1:43pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/3 "2020-03-24T13:43:56Z")

</div>

Hi Marco,  
I have it enabled, but keep getting the error.

---

<div class="post-metadata">

**Author:** ![paulrothrock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paulrothrock/32/2967_2.png) [@paulrothrock](https://forum.mattermost.com/u/paulrothrock)\
**Post date:** [March 24, 2020, 7:38pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/4 "2020-03-24T19:38:49Z")

</div>

Hi @danielha23,

~~Add `localhost` to the [Allow Untrusted Internal Connections To](https://docs.mattermost.com/administration/config-settings.html#allow-untrusted-internal-connections-to) setting. For security, Mattermost prevents connections to local domains - 127.0.0.1, 192. and 10. networks, and domains that resolve to those IP addresses - from webhooks, slash commands and other actions users can take. So if you want a webhook to go to one of those IP addresses you need to add it there.~~

Note to self: Always read the whole thread

---

<div class="post-metadata">

**Author:** ![danielha23](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@danielha23](https://forum.mattermost.com/u/danielha23)\
**Post date:** [March 24, 2020, 7:57pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/5 "2020-03-24T19:57:35Z")

</div>

Hi @paulrothrock,

So then I have to add the complete webhook address? Because I already have added the localhost as an Allowed Untrusted Internal Connection.

---

<div class="post-metadata">

**Author:** ![paulrothrock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paulrothrock/32/2967_2.png) [@paulrothrock](https://forum.mattermost.com/u/paulrothrock)\
**Post date:** [March 24, 2020, 7:58pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/6 "2020-03-24T19:58:34Z")

</div>

Sorry, I missed that. 🤦‍♂️ I’ll replicate it and file a bug ticket

---

<div class="post-metadata">

**Author:** ![paulrothrock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paulrothrock/32/2967_2.png) [@paulrothrock](https://forum.mattermost.com/u/paulrothrock)\
**Post date:** [March 24, 2020, 8:18pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/7 "2020-03-24T20:18:17Z")

</div>

@danielha23

In my replication environment I set the Allow Untrusted Internal Connections to `127.0.0.1 localhost` and my webhook was working. If that doesn’t work, what version of Mattermost are you using?

---

<div class="post-metadata">

**Author:** ![danielha23](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@danielha23](https://forum.mattermost.com/u/danielha23)\
**Post date:** [March 24, 2020, 8:24pm UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/8 "2020-03-24T20:24:33Z")

</div>

@paulrothrock

![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/d/d7a01ca727d7e92421fd065ab327e0e69c0e7efb.png)

I just added like that but I keep getting the error. I have dockers mattermost-preview image, it is version 5.18.0-rc1

---

<div class="post-metadata">

**Author:** ![paulrothrock](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paulrothrock/32/2967_2.png) [@paulrothrock](https://forum.mattermost.com/u/paulrothrock)\
**Post date:** [March 25, 2020, 12:25am UTC](https://forum.mattermost.com/t/error-app-webhook-go-110-address-forbbiden/9274/9 "2020-03-25T00:25:55Z")

</div>

I just tried it using the [Mattermost Preview](https://github.com/mattermost/mattermost-docker-preview) image. With the default setting for `Allow Untrusted Internal Connections` - `""` - I got the same error you saw. When I set it to `127.0.0.1 localhost` I received this error:

```auto
{"level":"error","ts":1585095118.2333198,"caller":"app/webhook.go:110","msg":"Event POST failed.","error":"Post http://localhost:5005/webhook: dial tcp 127.0.0.1:5005: connect: connection refused"}

```

This shows that it was able to attempt the connection and wasn’t filtered because it was directed to an internal address. (My docker image isn’t set up to access my host and I don’t have a service running on port 5005 on the docker machine.) I also have `EnableInsecureOutgoingConnections` set to `false`.

Can you verify that `Allow Insecure Connections` is set to the correct values in the System Console?
