Multiple scripts are written in multiple languages on the server (CentOS 7).
without rewriting the URLs referenced by all these scripts individually.
Monitor access to those scripts, like a firewall, and
If these scripts attempt to browse outside the server (e.g.http://hoge1.hoge),
I'm trying to find a way to change this to another URL (e.g.http://hoge2.hoge) to get access.
Is this possible?
I'd appreciate it if you could just give me keywords for searching.
I think we will have an HTTP proxy to rewrite the access and let it go through.
Many programs that communicate with HTTP follow it by referring to the environment variables HTTP_PROXY
and http_proxy
, so this is usually configured.
To accommodate programs that do not respect these settings, we use a mechanism called a "transparent proxy."
Transparent proxy requires OS-level support, and for Linux, you can set it to iptables
.
(It might be difficult to say "only certain programs".Would you like to keep the program in a container?)
© 2024 OneMinuteCode. All rights reserved.