A
A
Abchys2017-10-13 20:28:57
Nginx
Abchys, 2017-10-13 20:28:57

How to pass client ip to virtual machine in hyper-v?

Hello.
I ask for help regarding obtaining a real Ip of a user when entering the site.
There is a server running windows 2012r2 which has a white ip address (1.1.1.1) and looks to the Internet. A virtual network was made on it and it became a gateway (192.168.1.1), as well as raised (using hyper-v) CentOS (192.168.1.2) and deployed LAMP.
Forwarded ports from windows to the virtual machine (1.2) 80, 443, 8080. Everything is ok, everything works fine. But all users who visit the site have an ip address of 192.168.1.1, which in turn is very logical ...
Tell me, please, how can you make a rule on Windows so that the real ip of the client is transmitted, and not the ip of the gateway?
ps respected a lot. the only remaining thought is to put centos on the internet directly...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Abchys, 2017-10-17
@Abchys

I will answer myself.
It is not enough just to forward ports through powershell. It is necessary to do everything through RRAS.

V
Vladimir Mukovoz, 2017-10-14
@castomi

If ports are forwarded, then the client's ip is visible by default. You are clearly confusing something.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question