Results 1 to 2 of 2

Thread: WAN Webserver on port 80

  1. #1

    Smile WAN Webserver on port 80

    Tested on my wl-500g running 1.9.2.7-2[Oleg]
    Last edited by alpha5; 06-01-2005 at 14:34.

  2. #2

    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[CODE]

    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
    [CODE]

    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
    [CODE]
    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; 06-01-2005 at 19:17.

Similar Threads

  1. WAN Webserver on port 80
    By alpha5 in forum WL-500g/WL-500gx Tutorials
    Replies: 34
    Last Post: 16-05-2005, 17:09
  2. WL-HDD as WebServer??
    By fstolle in forum WL-HDD Q&A
    Replies: 11
    Last Post: 27-01-2005, 06:28
  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
  •