in reply to assigning ip on internet users on my network

A CGI script isn't going to be able to change the IP address of computers which access it (unless you really want to get into weird stuff with setuid scripts and net hacking). You want to work through existing protocols, such as DHCP, to do that sort of thing. It's going to be a lot less painful that way, too. :)

Is the goal to let people use your home network temporarily? It's better to start by telling us what you need to do rather than how you're trying to solve it. :)

Perhaps you want something like NoCatAuth. It provides a captive portal through which users can authenticate and then gain network access. It's even built into some routers already.

Update: It seems to me that you have some reading to do about network administration. If your goal is to track users, grab the MAC when they get an address. The MAC uniquely identifies the computer. You might also suggest to your boss to get someone to help you set it up. Again, focus on the goal and not the method :)

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review
  • Comment on Re: assigning ip on internet users on my network

Replies are listed 'Best First'.
Re^2: assigning ip on internet users on my network
by eko_hermiyanto (Initiate) on Nov 23, 2006 at 21:25 UTC
    Dear brian and zaco, thank you very much for your reply. Here, in this apartement where I am working now has been already set-up network. Then, the bos asked me to write code which will assign ip address into internet users each time they get connected to the network. And this ip addresses are specific into certain rooms. For example, room 1 has ip address bla.bla.bla.bla. I don't know how to solve this problem with perl. I am new into this what many people call as mighty programming language. But, I just figured out, that I can write a web interface in which users will input their username and password, and then their computers will be assigned with ip addresses which have been decided to be used in their room by a little perl CGI script. The scheme is username:password:ip-address. My bos only wants every rooms has their own ip address. Then, my bos able to monitor the access of the internet for each room. Because if each room has its own ip address, then we will know what's room which has a given ip address. This kind of thing can not be implemented in DHCP. So, this is the problem exactly. Thank you very much again for your help. It's very much useful for newbie just like me.
      When you talk about assigning IP addresses, you are definitevely in the realm of DHCP.

      Is this a wired or wireless network ?

      It appears that what you are looking for is a combination of DHCP, 802.1x, and dynamic VLAN assignment.

      All these topics are beyond the scope of discussion at this website.

      With a better problem description, I'm sure perlmonks would be happy to help.

           "A closed mouth gathers no feet." --Unknown