Reputation: 177
I'm trying to build an attendance-taking Ruby on Rails app for a college class, but I'm trying to avoid people cheating by signing in from places other than the classroom. The school's networking staff told me that wireless IPs on campus aren't separated by building, such that gathering devices' IP addresses won't tell me who's in class and who's in their dorm rooms. However, I realized that if I could somehow get the device to give me the IP of the router it's connected to, that could be a more reliable way to figure out where someone is.
Which brings me to my question: Is there a way for a Rails app to get the IP address of the router that a device is connected to? I know how to get the IP of the device itself, but like I said, that won't work here. Thanks!
Upvotes: 3
Views: 176
Reputation: 473
You can get someone's public IP address however their router's IP address is not accessible. This is not accessible using any programing language as that data is not transmitted over web requests.
Upvotes: 1