Problem with PHP $_SERVER["REMOTE_ADDR"]
Posted: Fri May 01, 2020 2:17 am
Hi guys
I have an openvpn server with public and static address 77.77.77.77, and a local client called 'julieta' running Centos with PHP and, 'julieta', has a full DMZ from the openvpn server; so when I put the main ip 77.77.77.77 everything goes to julieta no matter which port is. Works like a charm except from one thing.
When I use in julieta the PHP function $_SERVER["REMOTE_ADDR"] (this function gives the IP address from which the request was sent to the web server, in this case julieta), the function only returns the internal host of vpn server (in this case 172.27.224.1), not the real visitor ip.
So, looks like all my visitors come from te same address.
I try to change from NAT to Routing, but nothing change, what im missing?
I really aprecciate any help.
Javier
I have an openvpn server with public and static address 77.77.77.77, and a local client called 'julieta' running Centos with PHP and, 'julieta', has a full DMZ from the openvpn server; so when I put the main ip 77.77.77.77 everything goes to julieta no matter which port is. Works like a charm except from one thing.
When I use in julieta the PHP function $_SERVER["REMOTE_ADDR"] (this function gives the IP address from which the request was sent to the web server, in this case julieta), the function only returns the internal host of vpn server (in this case 172.27.224.1), not the real visitor ip.
So, looks like all my visitors come from te same address.
I try to change from NAT to Routing, but nothing change, what im missing?
I really aprecciate any help.
Javier