Mobile Multimedia Lab



P2PWNC: Peer-to-peer Wireless Network Confederation RI - Documentation





This is a client program to remotely configure the Linksys WRT54GS wireless router. Its operation requires that a configuration server is running on the router box. This server listens for client requests and either gets, sets or unsets configuration variables stored in the router's NVRAM. Using this client program, the router's administrator can retrieve or manipulate configuration information that have to do with the P2PWNC protocol. For example, he can upload the P2PWNC team's public key, when using the P2PWNC protocol.



This is free software, available under the GNU General Public Licence. For more information see COPYING.



This is version 0.0.1 of the wrt-conf-client software.



  • wrt_conf_client.c: Configuration client program

  • conffile.c, conffile.h: Routines for parsing command line options and configuration files



This module runs on Linux (but might as well be ported to other operating systems). It has been tested under Linux 2.4/2.6.



For generic configuration instructions see the INSTALL file or type ./configure --help. Be careful to specify the installation directory of your choice using the --prefix option.



To build the software, you can follow the steps below:



  • Untar the archive (tar xvfz wrt-conf-client-vXXX.tar.gz)

  • cd to the source directory

  • Configure the software typing ./configure and using the above instructions

  • Type make to compile the sources


After building the software, type 'make install'. This will install the software to the <prefix> directory (as specified when configuring the package). This will create the following directory structure:

+-prefix
|
+-bin
  |- wrt_conf_client

To uninstall it, type 'make uninstall'.


To run the program type
./wrt_conf_client
. A list of the appropriate command line options will be shown. The same list appears when typing
./wrt_conf_client -h
or
--help
.

Example usage:
To set a P2PWNC team's public key in a Linksys NVRAM variable, issue the following command:

./wrt_conf_client -srv 192.168.1.1 -p 5555 -s p2pwnc_ap_key -f path_to_pub_key


In the above command, we suppose that the configuration server's IP address is 192.168.1.1 and the server port is 5555 (default). The -s flag specifies that we wish to *set* a variable. We also suppose that the variable that we wish to set is called
p2pwnc_ap_pub
. The -f flag indicates that the value of that variable is stored in the file
path_to_pub_key
. The -s flag can also be used with the -v flag, which is followed by the exact variable value in the command line.

The protocol for the communication between the client and the router configuration daemon uses some simple authentication; after running the above command, the uses is prompted to supply the router administrator's password (normally, this password is stored in the router's
http_passwd
NVRAM variable).