SyntropyStack —UI — Nginx and curl client — Part 1
In this tutorial, we will interconnect two Vm through syntropystack in order to execute a CURL command from the VM1 Cloud to the Nginx VM2 server.
Start Syntropy Agent with Docker
sudo docker run --network="host" --restart=on-failure:10 --cap-add=NET_ADMIN --cap-add=SYS_MODULE \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--device /dev/net/tun:/dev/net/tun --name=syntropynet-agent \
-e SYNTROPY_API_KEY=CHANGE ME \
-e SYNTROPY_TAGS=CHANGE ME \
-e SYNTROPY_PROVIDER=CHANGE ME \
-e SYNTROPY_AGENT_NAME=CHANGE ME \
-e SYNTROPY_NETWORK_API='docker' \
Build 2x VM
- First VM: Nginx You can’t use -p flag
- Second VM: Cloud1 with commande CURL
Here are some explanations for each service:
- Nginx: is a web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and first publicly released in 2004.
- Curl: is an online command interface, designed to retrieve the contents of a resource accessible through a computer network.
The VM of different vendors register on the SyntropyStack interface thanks to the agent launched by Docker.
Create your Network SyntropyStack
Innovation is to be able to connect these VMs with one click. An encrypted Tunnel is then built. In order for services to communicate with each other, they must be linked together:
When we launch the CURL command to the Nginx server, we will get this
curl http://nginx_docker_ip<!DOCTYPE html>
<title>Welcome to nginx!</title>
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p><p>For online documentation and support please refer to
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p><p><em>Thank you for using nginx.</em></p>
Congratulations, your architecture is up and running ;-)
In conclusion, we were able to demonstrate that we were able to interrogate a Nginx server without going through the internet.