简体   繁体   中英

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. 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. 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

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. And for example

$(host-ip) or $(ip)

I guess is what you need. more about it you can read here https://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM