如何使用 GeoIP apache 模块在本地伪造自己的 IP
How to fake own IP in local using GeoIP apache module
我需要先在本地测试 GeoIP apache 模块,然后再将其投入生产。为此,我需要在访问地址时发送一个假 IP,而不是 127.0.0.1。
问题: 有没有办法伪造本地主机 IP?例如通过配置 Apache ?
我最终使用 cURL 完成了它。
当使用代理时,GeoIP 中有一个选项使 GeoIP 考虑 X-Forwarded-For
header 元素。所以通过发送 curl --header "X-Forwarded-For: 1.2.3.4" "http://your.site/path
就完成了工作。
的更多信息
我需要先在本地测试 GeoIP apache 模块,然后再将其投入生产。为此,我需要在访问地址时发送一个假 IP,而不是 127.0.0.1。
问题: 有没有办法伪造本地主机 IP?例如通过配置 Apache ?
我最终使用 cURL 完成了它。
当使用代理时,GeoIP 中有一个选项使 GeoIP 考虑 X-Forwarded-For
header 元素。所以通过发送 curl --header "X-Forwarded-For: 1.2.3.4" "http://your.site/path
就完成了工作。