Results 1 to 2 of 2

Thread: Webserver not on port outside:80

  1. #1

    Webserver not on port outside:80

    Hi,
    I am trying to get my WL500G running a webserver on a 128Mb stick.
    I flashed to oleg latest (7-7) and have installed ipkg and the php-thttpd webserver using the macstat tutorial. Now the webserver is working, but I can't get the webserver to serve on the outside.

    So, 192.168.2.1:81 serves the test page and 192.168.2.1 shows the WL500 webinterface. When I use my outside IP http://outside I get the WL500G webinterface instead of my own page.

    I have WAN access to the webinterface disabled and this is my post-firewall script:

    #!/bin/sh
    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 $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
    iptables -A INPUT -j DROP

    Enabling a virtual server from the NAT tab, pointing it from 80 to 192.168.2.1:81 does not have any effect.

    Surely I am missing something..

    Thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Use the following instructions. This is different approach without using iptables. Move GUI interface to other port with setting http_lanport NVRAM variable and then run your http server on port 80 as usual. This feature was added in latest 7b Oleg firmware and works for both LAN and WAN at the same time.

    Code:
    http_lanport-mini-howto.txt
    
    This patch enables http_lanport variable to move router Configuration httpd
    daemon to port other than standard 80. The main application is to use
    builtin http builtin for other purposes. Port 80 can then be used for
    servers like httpd, busybox_httpd, thttpd, ... Setup port with eg. nvram set
    http_lanport=8008 ; nvram commit
    
    
    Create Web pages in flashfs:
    
    flashfs enable
    mkdir /usr/local/root/www
    vi index.html
    
    <html>
    <head>
    <title>Test HTTP access</title>
    </head>
    <body>
    <h1>My HTTP server </h1>
    </body>
    </html>
    
    
    Move config interface to http://192.168.1.1:8008/
    
    nvram set http_lanport=8008
    nvram commit
    reboot
    
    
    Manual start http server on port 80
    
    busybox_httpd -h /usr/local/root/www
    
    
    Start busybox_httpd at boot:
    
    mkdir /usr/local/sbin
    cd /usr/local/sbin
    cat >> post-boot
    #!/bin/sh
    busybox_httpd -h /usr/local/root/www
    Ctrl-D
    chmod +x post-boot
    flashfs save
    flashfs commit
    Last edited by oleo; 17-01-2006 at 07:41.

Similar Threads

  1. Replies: 0
    Last Post: 31-12-2005, 06:33
  2. Replies: 1
    Last Post: 07-09-2005, 08:09
  3. WAN Webserver on port 80
    By alpha5 in forum WL-500g/WL-500gx Tutorials
    Replies: 34
    Last Post: 16-05-2005, 17:09
  4. Firmware v1.9.2.7 CR1 [Oleg]
    By Oleg in forum WL-500g Firmware Releases
    Replies: 53
    Last Post: 13-04-2005, 23:26
  5. Packet lost problem
    By hugo in forum WL-500g Q&A
    Replies: 9
    Last Post: 13-03-2005, 17:26

Posting Permissions

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