[英]is it possible to get exact client local IP address using django under mikrotik hotspot network?
when I connected my server to regular router request.META['REMOTE_ADDR']
works fine.当我将服务器连接到常规路由器request.META['REMOTE_ADDR']
工作正常。 it gets the correct IP, but when I setup the connection within mikrotik hotspot it gets the DNS IP which is 10.17.1.1.它获得了正确的 IP,但是当我在 mikrotik 热点中设置连接时,它获得了 DNS IP,即 10.17.1.1。 my settings:我的设置:
-> hotspot address 10.17.1.1/24
-> server address 10.17.1.2
-> server was already added in walled garden and IP Binding to bypass hotspot authentication
I got an access to the server website even not logged in to hotspot but i got the client incorrect ip address which always returned as 10.17.1.1即使没有登录热点,我也可以访问服务器网站,但我得到的客户端 IP 地址不正确,它总是返回 10.17.1.1
please help... any best ideas or solutions will be much appreciated!请帮助...任何最好的想法或解决方案将不胜感激! thanks!谢谢!
I'm not familiar with django, but in oryginal mikrotik Hotspot there are variables which you can use on the hotspot website located in your RouterOS.我不熟悉 django,但在 oryginal mikrotik Hotspot 中有一些变量可以在位于 RouterOS 的热点网站上使用。 And for example例如
$(host-ip) or $(ip) $(host-ip) 或 $(ip)
I guess is what you need.我想这就是你需要的。 more about it you can read here https://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot更多关于它你可以在这里阅读https://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.