1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting router as a web server

Discussion in 'Tomato Firmware' started by cariyawa, Mar 7, 2010.

  1. cariyawa

    cariyawa Addicted to LI Member

    I am trying to setup my router as a web server. I installed thttpd using optware and it is working on port 8080. I use DDNS and forwarded the port 80 to 8080. Also I used the iptable rule:

    iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
    I can access the web server within my LAN using ddns host name, but I couldn't access it from the out side of the network. I checked the router log and it says those incoming packets are dropped. So I guess it has something to do with my iptable rule. Any help?
  2. teddy_bear

    teddy_bear Network Guru Member

    Configure your router for remote HTTP access on the "Admin Access" page in the GUI, save the settings. Then take a look at the /etc/iptables file to find all the rules Tomato created for the port you specified in the GUI.
    You'll need to add the same rules manually for the port 8080, or whatever port you'd like to use for the web server.
  3. cariyawa

    cariyawa Addicted to LI Member

    Thanks T.B.
    Also..it seems like I need to do more reading too :)
  4. cariyawa

    cariyawa Addicted to LI Member

    Here is what I did, just if somebody else need it. I changed router local admin port to 8080. thttpd is running on port 80. Then, of course, use the basic port forwarding:80->80.
    Finally use the following iptable rule.

    iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
    Done! :biggrin:

Share This Page