Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to provide a way for users on my LAN to "register" with the Network admin (me) without having to either a) host a page on my computer b) host a script on the central server (since it is only a router, not really a solid HTTP server) or c) sign up for a Dynamic Domain in order to either either of the first two and avoid the confusion of sending out a URL to a link to a local IP.

Is there a simple way to display the local IP address on screen via a client-side script? I'm thinking maybe I could have an iframe that points to some generic url with some javascript in the path, so that I can have the users go to a non-local site, and the iframe would pop up with their IP address that they can then enter into a form in the main remote page.

If all else fails, is there a way for them to look up their IP that is cross-platform and doesn't involve using the command line (I think the first, even if impossible, is probably more realistic than the second).

share|improve this question

1 Answer 1

Is there a simple way to display the local IP address on screen via a client-side script?

No, at least I don't know of any cross-platform way to do this in Javascript. It's unlikely there is any, since this would be a considerable security hole (any site you visit could retrieve your networking configuration, which might be considered private information and could help in attacks). It's possible using IE and ActiveX, but I wouldn't recommend it (not cross-platform, don't know if it even works in recent IEs).

You could do it from a Java applet (if it is signed), as you have full system access (might also be possible from Flash).

That said:

Maybe you can explain why you believe you need this. Why do users have to "register" to you? Why do you even need their IP address?

Why don't you just give out IP addresses via DHCP?

If you explain your problem / goal in more detail, maybe there's a better way.

share|improve this answer
    
Basically, the network is very loose. IP addresses are assigned automatically, and from the router console, I can get hostname, local IP, and MAC address. This information, as useful as it is, doesn't help much if the hostname is either blank or "I-love-farting". In any case, I need the users to provide a real name to associate with the IP addresses that the DHCP server is assigning them, and a way to track down who has the blank hostnames to help them set better ones. Asking 40+ people by email to go look up their IP is easier said then done. –  Anthony Jan 26 '10 at 10:47
1  
Get a smarter router and it can implement the same behaviour of public wifi access points: force the user to a registration page until they register. This has the advantage of already being implemented for you. –  pjc50 Jan 26 '10 at 12:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.