como adicionar um script cgi-bin ao dd-wrt

0

Buffalo WHR-300HP2, com: Firmware Versão DD-WRT v24SP2- (11/05/13) std - build 22750, em: Versão do Kernel Linux 3.10.18 # 37 ter Nov 5 08:17:35 CET 2013 mips .

Eu gostaria de adicionar um script de shell ao httpd existente.

parece que pode haver alguns problemas com isso.

obrigado

    
por Ray Tayek 23.07.2016 / 14:31

1 resposta

0

For DD-WRT V24 pre SP2 (svn 12533+) CGI support has been disabled as a fix for an exploit.

Você pode instalar e configurar vlighttpd separado .

Separate httpd-server for your site

For the best result it is better to use separate httpd-server for your site. There are several possibilities: install vlighttpd e.g. with Optware, The Right Way or install Optware-ByHand and after that busybox (for simple httpd) or install lighttpd. [edit] Assumptions

  • You have telnet and SSH enabled on your router. See Telnet/SSH_and_the_Command_Line.
  • You can install additional httpd-server to your router.
  • You can send files via SSH to and from your desktop (e.g with WinSCP)
  • You have jffs enabled and enough free space to store your files or you have some other persistent partition e.g. mmc mod or usb drive. [edit] Procedure

1) Install additional www-server of your choice e.g. busybox httpd, lighttpd or vlighttpd from optware

2) Move default httpd away from port 80 (optional). Easiest is just to disable web administration via http, https uses port 443. Other option is to set the http_lanport nvram variable in the nvram:

nvram set http_lanport=81 nvram commit reboot

Note: Even if you plan to use secondary IP for your own site, you need to move the built-in httpd away from the port 80, as it listens it's port on all IP:s.

3) Optional: open to the world

Caution! The following steps could make the router's management pages accessible from the WAN (for example http://Your.WAN.IP/Management.asp). The password should be required however, so make sure it is strong.

Open web admin Administration -> Diagnostics, press "Run"

Enter this line to the Commands field:

/usr/sbin/iptables -I INPUT 1 -p tcp --dport 80 -j logaccept Press "Save Firewall", the router will reboot or reboot it manually.

How to cancel this?

Telnet to the router and type:

nvram set rc_firewall=""
nvram commit
reboot
    
por 24.07.2016 / 00:51