# Connection to a private server

**URL:** <https://forum.ansible.com/t/connection-to-a-private-server/229>\
**Category:** Get Help\
**Tags:** windows\
**Created:** [August 31, 2023, 11:46am UTC](https://forum.ansible.com/t/connection-to-a-private-server/229 "2023-08-31T11:46:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrija1993](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@adrija1993](https://forum.ansible.com/u/adrija1993)\
**Post date:** [August 31, 2023, 11:46am UTC](https://forum.ansible.com/t/connection-to-a-private-server/229/1 "2023-08-31T11:46:45Z")

</div>

Hello Team

I am totally new to ansible and learning on it I want to setup a connection to a windows server which is a a kind of bastion server and from there establish a connection to a linux server in private subnet (both the servers are in aws) can anyone please help me to write the ansible playbook for this and also brief me about the steps

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [August 31, 2023, 1:29pm UTC](https://forum.ansible.com/t/connection-to-a-private-server/229/2 "2023-08-31T13:29:06Z")

</div>

I’m not sure if this is really possible. I’ve never used bastion hosts, but as far as I understand they are a control node in disguise. And [you cannot use a Windows system for the Ansible control node](https://docs.ansible.com/ansible/latest/installation_guide/installation_distros.html#installing-ansible-on-windows).

If my assumption is correct, you would need a Linux system (native, as a VM on you Windows machine or using WSL). Alternatively, you could try and use your Windows system to proxy WinRM traffic. I’ve found [this](https://serverfault.com/questions/734833/how-do-i-configure-a-winrm-jump-host-for-use-with-ansible) and [this blog post](https://www.zippyops.com/ansiblewindowswindowsjumhost) which might help you.

---

<div class="post-metadata">

**Author:** ![gwmngilfen](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gwmngilfen/32/6_2.png) [@gwmngilfen](https://forum.ansible.com/u/gwmngilfen)\
**Post date:** [September 7, 2023, 8:41am UTC](https://forum.ansible.com/t/connection-to-a-private-server/229/3 "2023-09-07T08:41:59Z")

</div>

If that helped @adrija1993 then let us know, and maybe hit the ✔ to accept @mariolenz’s solution. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 7, 2023, 8:42am UTC](https://forum.ansible.com/t/connection-to-a-private-server/229/4 "2023-10-07T08:42:12Z")

</div>

Closed on October 7, 2023, 8:42am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
