0
0
I've created the following file on my destination server: test.php
<?
echo json_encode($_SERVER);
When CURLing to this file from my computer(mac):
curl -XPOST '<myurl>/test.php'
the 'REMOTE_ADDRESS' that is returned is the external IP of my computer(as expected). However, when CURLing to this file from my source server(through ssh, linux), exactly the same command, the 'REMOTE_ADDRESS' is always the IP of my destination server. Somehow, the CURL command on my source server does not expose its IP on the other side.
There is no 'X_FORWARDED_FOR' property in the $_SERVER variable.
Is this some CURL configuration i'm missing on my source server?
1Do you mean that it shows identical values in REMOTE_ADDRESS and SERVER_ADDRES? – user1686 – 2019-08-20T07:49:48.330
Yes, REMOTE_ADDRESS contains the same value as SERVER_ADDRESS – Oht – 2019-08-20T07:51:19.657
Does the destination server have any NAT or "MASQUERADE" firewall rules? – user1686 – 2019-08-20T08:47:02.647