Well done
okay, new year, new firmware, new howto
Since few days i´m using 1.9.2.7-2 from Oleg.
Like in changelogs promised there are some changes in iptables since 1.6.x.x.
These changes are effecting on my last howto about the wan webserver.
So lets start:
At first you need "webspace" f.e. a usb memory stick, or an usb harddisk. How to install this is explained in your asus manual. If there are problems with it, use the search function of this forum!
Optional you can use a service like "dyndns.org" to be aviable allways under the same hostname on internet. F.e. ernstl.dyndns.org. To update your ip on connect use the internal updating client. (see asus manual)
If not done yet, connect to your aus device with a telnetclient of your choise, and login with username and password.
So far... After installing the usb memory device will be mounted as /tmp/harddisk on your asus device.
Now you should creat a seperated directory for your web files with this command:
Code:
mkdir /tmp/usbmount/web
If not allready exist, create the post-boot and post-firewall scripts:
Code:
touch /usr/local/sbin/post-firewall touch /usr/local/sbin/post-boot
Now open the vi editor by typing "vi /usr/local/sbin/post-boot". In vi press "i" to enter a simple insert mode. Type ore paste in the following lines, to make busybox_httpd automaticly started, and mount usb device bevore:
Code:
mount /dev/discs/disc0/part1 /tmp/harddisk -t vfat
busybox_httpd -p 81 -h /tmp/harddisk/web
Press "ESC" to leave inser mode. Now type ":wq!" followed by "return" to write changes and quit vi.
Now open the post-firewall file with vi (vi /usr/local/sbin/post-firewall).
Press "i" and fill in the following line
Code:
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1:81
iptables -A INPUT -j DROP
Then "ESC" and ":wq!". Files should now be saved.
To vertify the the files are filled with our informations "cat" the files with the command "cat [filename]".
To store changes in flash enter the following commands in your shell:
Code:
flashfs enable
flashfs save
flashfs commit
Necesarry!!!
After reboot busybox_httpd should be startet automaticly on port 81, by the post-boot. Iptables makes it aviable on port 80 for wan site.
To access the webserver from lan site, you need to connect on port 80. F.e.:
http://192.168.1.1:81
If you have problems do not hesitate to message me or post in Q&A forum!
Last edited by alpha5; 08-01-2005 at 18:57.
Well done
My Stuff: WL-500g, Mapower H31x 10GB HD, Philips Webcam Vesta PRO, TerraTec Webcam PRO, USB Hub
soory for my veeeeery bad english
but i dont have this dyrectory : /usr/local/sbin/
in my usr is only root! and this is empty
??
THX
Robi
Sorry for my litle Infomations
My aktualy firmaware is 1.9.2.7-3b by Oleg
You mean that i downgrade to 1.9.2.7-2 and than its No Problem with
the Instructions what you Post
---------------------------------------------------------
okay, new year, new firmware, new howto
Since few days i´m using 1.9.2.7-2 from Oleg.
Like in changelogs promised .......
---------------------------------------------------------
Robi
Any chance to have this working for 1.9.2.7CR3c ?
The Struggle Continues...
Asus WL500g #1 with fw 1.9.2.7-7f running as main home gateway, with Philipps PWC730k
Asus WL500g #2 with fw 1.9.2.7-7f running as Wireless Client, running palantir 2.6 with SPCA5xx camera on 128MB generic USB key
Okay, i've have it running, works great....
But the post-boot script doesn't load when the unit boots.... I have to start it manually
The Struggle Continues...
Asus WL500g #1 with fw 1.9.2.7-7f running as main home gateway, with Philipps PWC730k
Asus WL500g #2 with fw 1.9.2.7-7f running as Wireless Client, running palantir 2.6 with SPCA5xx camera on 128MB generic USB key
Post-boot does load, only the HDD is mounted after post-boot.Originally Posted by max2950
You can use the script from: http://wl500g.info/showpost.php?p=6290&postcount=26
to let post-boot wait for the mount process to be completed.
Hey this work great now my second server loads right after boot !Originally Posted by Styno
However i had to change your script a little bit so that it works on 1.9.2.7 firmware....
Now i'm going to look for some infos in order to get a nice config file for my server, i.e. i want to configure it so that it loads index.htm when you only specify a folder in the URL....Code:#!/bin/sh i=0 while [ $i -le 30 ] do if [ -d /tmp/harddisk/ftp_pub ] then break fi sleep 1 i=$i + 1 done busybox_httpd -p 81 -h /tmp/harddisk/web
Last edited by max2950; 03-03-2005 at 15:44.
The Struggle Continues...
Asus WL500g #1 with fw 1.9.2.7-7f running as main home gateway, with Philipps PWC730k
Asus WL500g #2 with fw 1.9.2.7-7f running as Wireless Client, running palantir 2.6 with SPCA5xx camera on 128MB generic USB key
Hello,
I want to run a webserver on Wl-500.
Are there any differences in the manual to the 1.9.2.7CR3c???
I already mount the HDD in the Post-firewall.
WL-500gP => 1.9.2.7-7g (2007-04-06)
Running: thttpd, php 5.1, vsftp, rrdtool
http://onlinefussballmanager.de/userbar/0/53647.png
Just try it.Originally Posted by britnet
hi, I read everywhere about webservers run form a USB harddisk or something like this. is it possible to run them from a pc behind the router (and could I use this "how to" to enable it?) - or is that a completly different problem?
Read your manual on "Virtual Server" and install IIS or Apache on the PC.Originally Posted by sup
I hoped it would be so easy:-) (and i should start to more read manuals and less use the internet;-))
Do you mean that you mount the HDD "manually" in the Post-firewall? I do not know if this is right...Originally Posted by britnet
To enable your webserver use the post-boot script by styno which i changed a bit because it did not run on 1.9.2.7CR3c....
The Struggle Continues...
Asus WL500g #1 with fw 1.9.2.7-7f running as main home gateway, with Philipps PWC730k
Asus WL500g #2 with fw 1.9.2.7-7f running as Wireless Client, running palantir 2.6 with SPCA5xx camera on 128MB generic USB key
Yes, i uses this:Do you mean that you mount the HDD "manually" in the Post-firewall? I do not know if this is right...
Shouldn't I do that?Code:mount /dev/discs/disc0/part1 /tmp/harddisk -t vfat
Ok, but where can I get it?To enable your webserver use the post-boot script by styno
WL-500gP => 1.9.2.7-7g (2007-04-06)
Running: thttpd, php 5.1, vsftp, rrdtool
http://onlinefussballmanager.de/userbar/0/53647.png