Will Ansible work in case of Windows Jump Server? - windows

I wanted to know if we have Windows jump server instead or bastion server will Ansible work? if yes how can we achieve this

This is possible, via Nginx.
Send the WinRM traffic to Nginx. Configure Nginx in a way that each target host has an their own url.
example.com/tn1
example.com/tn2
Let each node point to your my.fqdn.com/wsman.
Look at this pull request.

Related

Localhost to local network port redirection on Windows

I have a server that listen on http://localhost:8001 and I want to make it available in the local network. Unfortunately I don't have access to the code and can't modify the above. It doesn't listen to requests from outside the network on port 8001.
I want to make it both available in the local network and change the port to 9001. Is there some tool or way to use OS functionality to solve this?
It's a Windows computer and I don't have admin rights.
Edit:
I noticed both python -m SimpleHTTPServer and http-serv on node works if I use 0.0.0.0 as the address but I don't have the power to modify this program so I wanted some way to redirect the calls in a bidirectional way
Edit2:
It's a OWIN Selfhosted .NET Framework Application.
Simply using your hostname should be enough.
You only need a reverse proxy in order to change the port.
This is easy enough with a caddyfile:
caddy reverse-proxy --from :9001 --to 127.0.0.1:8001
And a caddy Windows release (like caddy_2.0.0_windows_amd64.zip) does not require any administration/elevated privilege: just use the caddy.exe. That is it. No setup, no installation, no registry modification.
Then:
https://<yourHostname>:9001

Ansible Haproxy add backend with ansible

So i would like to run a playbook via ansible on a host get the ip of that host and then add it to the haproxy.cfg.
I have managed to get the ip from the the host by using ansible_default_ipv4.address": "192.168.159.44 but i dont think this is the correct way to do this.
I want to basically add this line
server dnsnameofserver IP:80 check fall 3 rise 2 cookie uniquecookie
Where the IP and DNS name is collected from the server.
So the workflow im thinking is running a playbook on a webserver and that collects the info and then it sends that information to the haproxy server.
Is this even possible?
Getting the IP from ansible facts is proper way.You can create two host groups one webserver and another haproxy server. You can then use delegate_to haproxy server to run the haproxy command.

Is it possible to install localhost server in one pc and to access on multiple computers on a same network.?

We are building php web application while i am a designers and my friend is developer we work on different pcs we want to test the file by runnig on localhost on both of our pc how can we reach it. I have gone through some of concepts in internet but didn't get proper info.
Yes. You need to create a firewall rule to allow access through whatever port you are serving on, probably 8080.
Here is how to create an inbound port rule in windows
Then they should be able to access your server by simply using your ip

Allowing only certain ip traffic to server using Ansible

I am using Ansible to configure my several web servers. I want to restrict all traffic coming to those servers except some hosts. Actually, i want that these servers will only be accessed by some hosts only.
First figure out how to configure such a firewall on your system without Ansible. Then use Ansible to apply that configuration to a host.
I use package iptables-persistent on Debian 9, and use Ansible templating to manage /etc/iptables/rules.v4

Can I host mcpe server on a ftp/cpanel account?

I have been interested in making my own MCPE server. I have found lots of online hosting websites. All of these sound great, but I want to know if there is a way to host an MCPE server on a ftp account. Thanks everyone.
You can't host a MCPE server using a FTP account because the host will terminate the task.
You can host your own MCPE server using PocketMine-MP from your computer (See here for more info).
Otherwise you can use a VPS or Minecraft host that supports PocketMine-MP, e.g. Aternos or HostHorde.
EDIT: You may need to port forward your router if you want to host a PocketMine-MP server from your computer.
Without some form of shell access this is impossible (I'm assuming by "FTP access" you mean it's a host for only "websites" and not some sort of VPS).
Even if you managed to get the executable running I imagine your host would squash that very quickly.

Resources