1

Could someone with more experience help me in this?

I have an idea in my head and i've been trying to put it into practice.

I have two machines, one where the application is hosted (I'll call it "Real Machine") and the other that would act as a proxy (I'll call it a proxy machine) redirecting the connections to the real machine's IP address.

The application defaults to port 2083.

I configured nginx on the proxy machine.. all work ok.

The logic is: Visitor -> Proxy Machine (Redirect) -> Real Machine (where the application is) -> OK

The problem is that until the connection is accepted everything is working OK (the real machine ip is hidden, only displays the proxy machine ip).. but when the visitor connects to the application if i use the command "netstat -n" i can see the IP address of the real machine. Would it be possible to disable the ip of the actual machine being displayed on netstat -n?

My goal is to mask the IP address of the machine where the application is hosted (only show the IP of "Proxy Machine"). It is possible?

Thank you!

This is my conf in proxy machine (nginx):

    stream {
    server {
        listen 2083;
        proxy_pass REAL_MACHINE_IP:2083;
    }
}
Renan
  • 11
  • 1
  • Hi, You can call that a reverse proxy. Cant tell with nginx howto configure, but the term might help if you search – yagmoth555 Sep 08 '19 at 02:42
  • You wrote "redirect" in the logic, which is not what you want ("Hey, look elsewhere for this"). Then again, your snippet shows `proxy_pass`, which *is* what you want ("Wait, I'll fetch that for you"). I flipped through the [docs](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass) and it souds as if you perhaps need to specify http or https in the `proxy_pass` line? -- In the end, al should even work when the real machine cannot even "see" (routing-wise) the client. – Hagen von Eitzen Sep 08 '19 at 06:58
  • The problem is that my application does not use the HTTP/HTTPS protocol. The service port is 2083. Do you understand? – Renan Sep 08 '19 at 15:26
  • Your setup seems to be correct, where are you tuning ```netstat -n``` ? On Visitor it should show the proxy IP, on proxy machine the Real machien IP. Alsop what is to service running on the Real machine ? Maybe the service is forcing the client to connect on is own IP. – vx3r Sep 09 '19 at 07:30

0 Answers0