Answer the question
In order to leave comments, you need to log in
How to determine the ip-address of the visitor if port 80 is forwarded through the router?
Through Mikrotik, I redirected port 80 to the LAN to the Web server.
How to find out the ip address of a web server visitor?
<?php
echo $_SERVER["REMOTE_ADDR"];
?>
Shows the local ip address of Mikrotik.
Answer the question
In order to leave comments, you need to log in
Issue resolved! Maybe someone is interested:
In Apache 2.4 on Windows, in order to see the remote ip-address behind NAT, you need to connect the module:
LoadModule remoteip_module modules/mod_remoteip.so
and write:
<IfModule remoteip_module>
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 127.0.0.1 192.168.5.1
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question