I'm having trouble understanding how communication occurs on a linux box if a front facing server like NGINX has been installed.
For example this is my setup.
AWS / EC2 linux based instance
NGINX - front facing server
Node.js / Express - upstream server
In this setup I have no problem communicating past NGINX with ping
, curl
, Node Package Manager
and other tools even without setting an http_proxy
environment variable. By default, without any added configuration these tools know how to get past NGINX and onto the internet.
In this common setup why don't I have to set up http_proxy
or something similar to allow outside communication? Once NGINX is installed doesn't all traffic go through it?
nginx is a web server, that answers to incoming HTTP / HTTPS requests. Whenever the interface that nginx is listening to can be connected from the public internet, nginx can serve web pages for it.
The access from other servers to internet is dictated by the network setup. In this case, all those servers have default routes to internet, so that their IP packets are forwarded to any public internet address by the edge router in the network.
These two cases are not related.
If there is a firewall on the edge of the network, then you can restrict the access of each internal server.