FAQ  •  Search  •  Profile  •  Log in to check your private messages  •  Log in
 Tutorial: Kai Daemon on WRT54G with Thibor Firmware View next topic
View previous topic
Post new topicReply to topic
Author Message
hacktek
Kai Beginner
Kai Beginner


Joined: 19 Jun 2004
Posts: 3
Location: Costa Rica

PostPosted: Sun Aug 27, 2006 9:29 am Reply with quoteBack to top

Tested on: WRT54G v4 with Thibor 15c Firmware

Files needed:

http://www.megaupload.com/?d=V6JGW9U7

Steps:

-Set up a webserver
-Put needed files there
-Edit configuration
-Upload to router

Credit on this part goes to Kamilion.

SET UP THE WEBSERVER

First, set up a webserver on ur pc:

Install abyss X1 webserver.
If XPSP2 asks to unblock, do so.

Abyss will start up, and tell you a configuration has been created and automatically open your web browser.
Enter any username you wish into Administrator Login, and the password you choose twice.
You'll need this to make any sort of config changes at http://127.0.0.1:9999/ (default)
It will then ask you to login using the username and password you have just created.
Click on Server Configuration.

You should see (if you did not change anything in the installer, and are using an english version of windows):
Server root: C:\Program Files\Abyss Web Server\
Documents Path: htdocs
Port: 8000

Note: PORT: may be different. If it is, make a note of it.
You'll need to change the script coming later (change :8000 to :<Whatever Port: says> )

You can close your webbrowser now, If you have changed the Port: you must click OK before you close it.
If you didn't change anything, just close it.

By default, Abyss will install to C:\Program Files\Abyss Web Server\
Within this directory, there is a folder named htdocs.
This is the root directory for the server, where all the files you are hosting go.

Place kaid and kaid.conf there now.

EDIT CONFIGURATION FILE

Next, edit the configuration file (kaid.conf)

I have included a configuration editor named confedit.exe and a default kaid.conf with more linksys information.
You may drag kaid.conf onto Confedit.exe to open it automatically.

Edit your config now to add your console's MAC address and if nessicary, SniffDevice.


The WRT54G 2.0 & WRT54GS use vlan0 for the 4 port switch and vlan1 for the WAN port
Also, the wireless on the WRT54G 2.0/GS is eth1. It is not bridged with the internal lan

The WRT54G 1.0 and 1.1 use br0 (bridge 0) for all switch ports (eth0) and wireless (eth2).
Wan is on eth1. Wireless on eth2. Switch on eth0. eth0 and eth2 are bridged on br0.

(Check bottom of WRT54G/GS for Version ID)
For Linksys WRT 1.0 & 1.1 use br0 -- for 2.0 use vlan0 for ethernet, eth1 for wireless

If your WRT says "WRT54G" and "1.0" or no version, and has about 20 lights on the front, with one marked "DIAG" you have a 1.0.

SniffDevice = br0

If your WRT says "WRT54G" and "1.1" and has 8 lights and NO DIAG, you have a 1.1

SniffDevice = br0

If your WRT says "WRT54G" and "2.0" or "2.2" or "WRT54GS" and has 8 lights, you have a 2.x.

For Wired Ethernet (A cable going to your console) set this:
SniffDevice = vlan0

For Wireless (Nintendo DS/PSP/Wireless Extender for TV-based consoles) set this:
SniffDevice = eth1



Now, you must set your MAC address(es)

Look for something like the following.
ConsoleMacs = 00:00:00:00:00:00;
Replace the 00:00:00:00:00:00 with your console's MAC address.
If it is using DHCP, you may possibly find this using 'dumpleases' over telnet/ssh/webconfig diagnostics.

For the PSP, you can find it's MAC address in the System Settings.
http://img6.exs.cx/img6/1962/GA000080049.jpg

MAKE SURE THERE IS A ; AT THE END OF THE LINE.

IF you have more than one console, you may seperate them using a ; but make sure there's one at the end. Here's an example.


ConsoleMacs = 00:00:00:00:00:00;88:00:00:00:00:01;
For two consoles.

ConsoleMacs = 00:00:00:00:00:00;88:00:00:00:00:01;99:00:00:00:00:02;
For three consoles.

And so on.

UPLOAD TO ROUTER

In the administration page, put this as your startup script:

Code:
route add default gw 192.168.1.1
echo "nameserver 192.168.1.1" > /tmp/resolv.conf
cd /tmp
echo "#!/bin/sh" > startkaid
echo "cd /tmp" >> startkaid
echo "if [ ! -s gokaid ]; then" >> startkaid
echo "wget \"http://IP:PORT/kaid\" -O gokaid" >> startkaid
echo "wget \"http://IP:PORT/kaid.conf\"" >> startkaid
echo "sleep 1;chmod +x gokaid;fi" >> startkaid
echo "./gokaid -d" >> startkaid
chmod +x startkaid
echo "*/2 * * * * root /tmp/startkaid" > cron.d/check_kaid
touch crontab


On the 7th and 8th lines of the script, change "IP" for the ip address of your network card (i recommend you set up a static lease for your card, google if u don't know what i'm talking about), and "PORT" for the port in which Abyss Web Server is running. After that, reboot the router.

To see if the daemon is working after you reboot the router, just go to run command in the administration page and type "ps | grep kaid" (without quotes). You should get something like this:

167 0 840 S ./gokaid -d
168 0 840 S ./gokaid -d
169 0 840 S ./gokaid -d
170 0 840 S ./gokaid -d
171 0 840 S ./gokaid -d
172 0 840 S ./gokaid -d
173 0 840 S ./gokaid -d
174 0 840 S ./gokaid -d
175 0 840 S ./gokaid -d
176 0 840 S ./gokaid -d
177 0 840 S ./gokaid -d

If you don't, wait a few seconds and run the command again. If it still doesn't work then you probably did something wrong.
View user's profileSend private message
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group :: Theme by Daz :: All times are GMT