# Using wsman in a proxy environment

**URL:** <https://forum.ansible.com/t/using-wsman-in-a-proxy-environment/36703>\
**Category:** Ansible Project\
**Created:** [June 8, 2022, 6:16pm UTC](https://forum.ansible.com/t/using-wsman-in-a-proxy-environment/36703 "2022-06-08T18:16:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Barnett](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/adam_barnett/32/4509_2.png) [@Adam\_Barnett](https://forum.ansible.com/u/Adam_Barnett)\
**Post date:** [June 8, 2022, 6:16pm UTC](https://forum.ansible.com/t/using-wsman-in-a-proxy-environment/36703/1 "2022-06-08T18:16:42Z")

</div>

Hi All,

we are running ansible on our network and have just deployed a proxy as we needed to cut off direct internet access. when trying to run a playbook that calls wsman i get this error

```auto
fatal: [10.22.0.109]: UNREACHABLE! => {"changed": false, "msg": "credssp: HTTPSConnectionPool(host='10.22.0.109', port=5986): Max retries exceeded with url: /wsman (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out')))", "unreachable": true}

```

the playbook look like this:

- hosts: 10.22.0.109

become: true

become\_method: runas

environment:

ansible\_winrm\_proxy: ~

roles:

- blah

I also tired setting ansible\_winrm\_proxy in my inventory but still not joy

i dont think we want to go via the proxy at all for this

Any suggestions

thanks

---

<div class="post-metadata">

**Author:** ![Antony\_Stone](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Antony\_Stone](https://forum.ansible.com/u/Antony_Stone)\
**Post date:** [June 8, 2022, 6:23pm UTC](https://forum.ansible.com/t/using-wsman-in-a-proxy-environment/36703/2 "2022-06-08T18:23:14Z")

</div>

Please give some more details of your network setup - specifically, the routing  
between your ansible server and the machine/s you're deploying / managing with  
it.

Please make it clear where the proxy server fits in to this routing.

You say you needed to cut off direct Internet access, but you are trying to  
manage a machine with the address 10.22.0.109, so how does "direct Internet  
access" come into this?

Are you trying to access this machine from a totally different network (across  
the Internet)?

---

<div class="post-metadata">

**Author:** ![Adam\_Barnett](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/adam_barnett/32/4509_2.png) [@Adam\_Barnett](https://forum.ansible.com/u/Adam_Barnett)\
**Post date:** [June 8, 2022, 8:24pm UTC](https://forum.ansible.com/t/using-wsman-in-a-proxy-environment/36703/3 "2022-06-08T20:24:44Z")

</div>

Hi

It is all hosted in gcp but all the machines are on the same network.

I’m using the IP address so ansible should connect directly instead of using gcp

The proxy sits between the workstation and the outside works.

The playbook that I get the error is for my workstion ont he same gcp network as the end machine.

I mentioned internet being cut off as the errror mentioned a proxy

Anything else you need

Thanks  
Adam
