Does Icinga2 works with router between server and client - icinga2

I want to install an Icinga2 server in my home network and asking myself if this central instance is able to monitor also clients which are located outside anywhere in the internet, i.e. behind my router? I could imagine that the central instance is able to contact the outer client but is there a need for the outer client to contact the central instance by its own?

The connection has to be established, either from the central server, or from the client. If a client node B.example.org cannot contact the central server A.example.org, you can declare on the client A.example.org without any Host setting:
object Endpoint "A.example.org" {
}
So the node will know the topology, but will wait for an incoming connection.

Related

Can we host a host websocket server in cloud as proxy/relay server to redirect websocket traffic from local network

[This post has been updated with a possible approach, which is added to the bottom]
I am trying to create a web socket connection between two devices((A). chrome in different computer and (B) a raspberry pi) in different networks. Thus, i can send video data over websockets. However, I cannot port forward the network of my router to expose my local IP to the network, thus, I can't send the data right away.
Figure below explains the architechture.
Thus ,I am trying to implement a logic so that Device A websockets the public ws of the cloud while, the cloud actually gets the data from Device B.So Device A websockets device B indirectly.
Device A<==>Cloud Server<==>Device B
The cloud could be something like a proxy or a relay websocket server.
The video feed needs to be sent in real time,
Please suggest how can i proceed with it.
Additional note, i have acquired an instance of digitalocean as VPS, following the blog Accessing home services from anywhere, without port forwarding! but not sure how to proceed.
Update(11th Nov,2019):
I am planning to use a websocket server on DigitalOcean instance(droplet),which would be listening to my local IP/port of my raspberry pi.And this VPS would act as a websocket server,which would redirect the traffic.
However, I am unsure how to use the same.And need your kind suggestions.

Requests from server to client

I know already about the web-sockets, and they are great, the problem with them is that they have to keep the connection open in order to be able to communicate.
I have a small system where from time to time the server has to update the status and notify the clients about that, and keeping the connection open from every client is not so optimal. At same time is very important that the update on the client side to be made just in time.
So my question is, if the server has a unique address does the client have a public temporary address where the server can send request? So when the client will connect to the server it will provide it's unique address and the server will cache it, and when there will be an update the server will send the request to that address?
I understand that there many problems as the address will constantly change, but this is already other question.
If client does not have a dedicated IP-address then it is not available from WAN unless it has an open connection with any node in it.
When client from local network sends request to a server it's (client's) router remembers client's local IP-address and port and translates it using NAT protocol to one of router's free ports and then sends data further with router's own 'IP-address of the sender' in IP protocol header and 'Sender's port' in TCP header. When router get's server's response it uses NAT table from it's memory to translate addresses back and deliver data to the client. Addresses are normally kept in NAT table while connection between server and client is open. So if there are no opened connections between server and local network client then server will not be able to connect with client because server does not know how to reach it.
You say you have a small system. Why then do you think that you will not have enough free ports at your server to work with websockets? If you just want to get updates from the server (not to both send and get data through a persistently opened connection) you'll probably find long polling or SSE more suitable. It is definitely easier to implement than websockets.

Force client disconnect by socket id

I'd like to force client disconnect by socket id using socket.io-redis.
I tried a lot of research in google, but methods mentioned in old topics does not work.
Let's say, I'm making clustered application and my code at the moment runs at cluster1 instance (also I have access to all connected client's socket ids), but the client is connected to cluster2 instance. How can I force disconnect to that client by socket id only?
I've implemented it by myself and pulled in the socket.io-redis repo. Method name is remoteDisconnect.

What is the definition of proxy-aware

I need clarification on the buzzword "Proxy-Aware". Does it mean that a proxy is sensed after the app attempts to directly perform a operation with a host? Or is it that after the creation of a proxy object (think .net WebProxy) and passing in proxy address, port, login etc.., the app knows how create and use the proxy connection to the server?
I think the word means if the application is able to establish connections to one or more proxy servers to reroute your connection attempt to target hosts through these proxy servers.
E.g. web browsers(proxy-aware) with proxy settings connects to the proxy server first and requests the proxy server to connect to your requested web page, but most terminal clients does not support proxy setting and can not perform such a process and thus are not proxy-aware.
After sifting through a few postings looking for a definition, I have come up with the definition for myself. "A proxy aware app is an app such that given a address (and/or creds) to a proxy as well as the destination address, the app will create the proxy connection and will manage the software side of the traffic between client, proxy connection and the destination." I conclude that a necessary condition to be a proxy-aware app is NOT the ability to sense a proxy but the ability to accept and manage the fact that there is an intermediate, addressable hop between client and destination.

How to establish a client server connection outside the LAN?

I am unable to establish a connection to the server of my client server app written in vb 6.0.
This is just because that the server of the app is behind a LAN router and the router of the LAN is not in my access so as to configure it. If it is possible to establish a connection so please let me know how? and if it is not possible than how the programs like team viewer and LogMein can establish a connection.
Ask the person who does administer the router to open the port or to give you a VPN tunnel, or to move the server to a lan with lower security requirements. If you have a good reason for needing this they shouldn't make a fuzz about it.
TeamViewer and LogMeIn rely on central systems under their own control. Both the client and the server make an outgoing connection to the central system that patches them through to each other. So on both sides the firewall only has to allow outgoing connections.
Depending on the router at the server end you might be able to use UPnP in your server to map the port through the NAT router.
See Easy UPnP NAT Traversal for a VB6 discussion of the topic.

Resources