Score:0

How to check if a remote server is up through a proxy?

in flag

I have a series of lab linux server (centos/rh) that are built using an automated PXE install via kickstart file. I would like to use another automated process (ansible) to monitor when the installations have completed. Normally I would use a simple tool like ping but these servers can only be accessed remotely through an internal proxy.

One idea was to add httpd and a simple index.html page via the kickstart, then use curl to loop over requesting the page. While this will work, it seems pretty heavy for such a simple check and then requires the extra step of removing all this baggage afterwards.

I understand that ping can't operate at this level in the stack, but is there a way to accomplish something like:

ping labhost --proxy 192.168.0.2:3128
dranobob avatar
in flag
it sounds like I might want an ssh bastion, I'm reading up on them now!
Score:0
cn flag

Allow ssh from the host running Ansible to the new instance. Either directly routed, or through something like a ssh bastion in front of it with ProxyJump. You will need to know an initial credential, so install a ssh key with the kickstart.

Add the host to inventory and run a play on it. wait_for_connection module will attempt to connect to it several times. The play will need gather_facts: False to skip the implicit gathering of host information, as it is not reachable to start.

Ansible's ping module is not ICMP echo. It remotes into the box, ssh by default, and gets a simple response back.


ICMP is a feature of IP, at a different layer than TCP or UDP. Does not make much sense to proxy an ICMP packet beyond where an IP packet would go.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.