Friday, January 12, 2007

dd-wrt has a websever too???

recently i found out this...

DD-WRT runs a small httpd server used for configuring the router. This guide will show how to use it to serve you own pages to your LAN or to the world. Please remember that opening WEB server to the world could be potential security problem.

Assumptions:

- You have telnet and SSH (http://en.wikipedia.org/wiki/Secure_Shell) enabled on your router. See Telnet/SSH_and_the_Command_Line.

- You can send files via SSH to and from your desktop (e.g with WinSCP)

- You have jffs enabled and enough free space to store your files or you have working mmc mod.

- I will assume you are installing to the jffs partition. If you are not, replace jffs with mmc or some other folder

- You have the "Enable Info Site" enabled (Administration -> Management -> WEB Access)- Optional: you have the "Wireless GUI Access" enabled (Wireless -> Advanced Settings)

- You MUST name your index file Info.htm (note upper case "I", thus "Info.htm" and NOT "info.htm")

How will this work?

- We will move the router's web admin to port 81

- We will start your WEB server at port 80

- Optional: we will open port 80 to the world

Procedure:

1) Copy your files to the router, i.e. to the /jffs folder
2) Open web admin Administration -> Diagnostics, press "Run"
3) Enter these lines to the Commands field:

killall httpd
cd /www
httpd -p 81 -h /www
cd /jffs
httpd -h /jffs

4) Press "Save Startup", the router will reboot or reboot it manually.

How to cancel this?

Telnet to the router and type:

nvram set rc_startup=""
nvram set rc_firewall=""
nvram commit
reboot

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home