reverse proxy with dns control

Francis Daly francis at daoine.org
Thu Apr 14 10:46:58 UTC 2022


On Wed, Apr 13, 2022 at 07:43:48AM -0400, arx wrote:

Hi there,

> for security problems on my server, I should create a reverse proxy that
> allows only those who use the dns provided by me to be able to pass.
> practically I make a list with the incoming dns and I pass only those to my
> main server behind the reverse.
> is it possible to do this?

I think you might be looking for two server{} blocks; one with "listen
port default_server" that will not talk to the backend; and one with
"listen port" without "default_server", and with "server_name" with the
names that you want, that will talk to the back-end service.

See, for example,
http://nginx.org/en/docs/http/server_names.html#miscellaneous_names where
using the config either side of "In catch-all server examples", requests
for four names to port 80 will be handled in one server{} block, and
requests for any other names to port 80 will be handled in the other
server{} block.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list