Page 1 of 3 123 LastLast
Results 1 to 15 of 35

Thread: WAN Webserver on port 80

  1. #1

    Smile WAN Webserver on port 80

    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.

  2. #2
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    377
    Well done
    My Stuff: WL-500g, Mapower H31x 10GB HD, Philips Webcam Vesta PRO, TerraTec Webcam PRO, USB Hub

  3. #3
    Join Date
    Jan 2005
    Location
    germany stuttgart
    Posts
    9
    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

  4. #4
    Join Date
    Jan 2005
    Location
    germany stuttgart
    Posts
    9
    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

  5. #5
    Join Date
    May 2004
    Location
    France...
    Posts
    159
    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

  6. #6
    Join Date
    May 2004
    Location
    France...
    Posts
    159
    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

  7. #7
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Quote Originally Posted by max2950
    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
    Post-boot does load, only the HDD is mounted after post-boot.

    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.

  8. #8
    Join Date
    May 2004
    Location
    France...
    Posts
    159
    Quote Originally Posted by Styno
    Post-boot does load, only the HDD is mounted after post-boot.

    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 !

    However i had to change your script a little bit so that it works on 1.9.2.7 firmware....

    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
    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....
    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

  9. #9
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt a.M.
    Posts
    299
    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

  10. #10
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Quote Originally Posted by britnet
    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.
    Just try it.

  11. #11
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46

    pc webserver

    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?

  12. #12
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    Quote Originally Posted by sup
    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.

  13. #13
    Join Date
    Jan 2005
    Location
    Kysice,Czech Republic
    Posts
    46
    I hoped it would be so easy:-) (and i should start to more read manuals and less use the internet;-))

  14. #14
    Join Date
    May 2004
    Location
    France...
    Posts
    159
    Quote Originally Posted by britnet
    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.
    Do you mean that you mount the HDD "manually" in the Post-firewall? I do not know if this is right...

    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

  15. #15
    Join Date
    Feb 2005
    Location
    Germany - Frankfurt a.M.
    Posts
    299
    Do you mean that you mount the HDD "manually" in the Post-firewall? I do not know if this is right...
    Yes, i uses this:
    Code:
    mount /dev/discs/disc0/part1 /tmp/harddisk -t vfat
    Shouldn't I do that?

    To enable your webserver use the post-boot script by styno
    Ok, but where can I get it?
    WL-500gP => 1.9.2.7-7g (2007-04-06)
    Running: thttpd, php 5.1, vsftp, rrdtool

    http://onlinefussballmanager.de/userbar/0/53647.png

Page 1 of 3 123 LastLast

Similar Threads

  1. WL-HDD as WebServer??
    By fstolle in forum WL-HDD Q&A
    Replies: 11
    Last Post: 27-01-2005, 06:28
  2. WAN Webserver on port 80
    By alpha5 in forum WL-500g/WL-500gx Tutorials
    Replies: 1
    Last Post: 05-01-2005, 16:00
  3. Webserver for Internet how to?
    By NIGHTCD in forum WL-500g Q&A
    Replies: 1
    Last Post: 08-07-2004, 19:38
  4. Webserver !!
    By ThaPaSSioN in forum WL-500g Custom Development
    Replies: 3
    Last Post: 01-07-2004, 12:05
  5. Webserver Indexpages
    By alpha5 in forum WL-500g Q&A
    Replies: 0
    Last Post: 21-06-2004, 10:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •