Switch from DD-WRT to OpenWrt in under 30 minutes. Sam Hobbs 2nd. Is there a way to reflash the openwrt from telnet or ssh or maybe bootable USB stick? Or any other way? Reply; Sam Hobbs. But I'm still wondering about achieving my goal from using openwrt, Its not a simple redirect what I want because there's no simple redirect for. You need to install OpenWrt Kamikaze Linux into your NSLU before installing USB Redirector. You can download OpenWrt Kamikaze from here: Download OpenWrt Kamikaze.
PHP should be ready to run. To activate PHP on PirateBox, you need to edit /opt/piratebox/conf/lighttpd/lighttpd.conf and remove the # in front of the last line: #include “/opt/piratebox/conf/lighttpd/fastcgi-php.conf”The can be achieved with the following command, too:sed -i -e 's ^#include '/opt/piratebox/conf/lighttpd/fastcgi-php.conf' include '/opt/piratebox/conf/lighttpd/fastcgi-php.conf' ' /opt/piratebox/conf/lighttpd/lighttpd.confAfter this make a reboot. All.php files are processed, as long as these are placed in the /content/ folder. This folder is located in /opt/piratebox/share - on OpenWrt on the USB stick /PirateBox/.Disable client isolation. On OpenWRT you need to change /etc/config/networkconfig interface 'loopback'option ifname 'lo'option proto 'static'option ipaddr '127.0.0.1'option netmask '255.0.0.0'config interface 'lan'option ifname 'eth0'option type 'bridge'option proto 'static'#- CHANGE THE LINE BELOW -option ipaddr '192.168.1.1'#- CHANGE THE LINE ABOVE -option netmask '255.255.255.0'Since 1.1: The next step is to change the referred IP in the firewall configuration. This can be done easily with that command:sed -i -e 's 192.168.1.1 g' /etc/config/firewallAs the changes will drop in the connectivity, reboot the box:reboot Small python Forum.
Do you want, that your users uploads to a different directory than the default directory, where the “Browse” link points to?You can easily achieve this with editing /opt/piratebox/conf/piratebox.conf. Find this line and enter your new upload folder:#Upload Folder# Change this if you want to user uploaded data in a subfolder# Make sure the folder exists# UPLOADFOLDER='$FOLDER/Upload'UPLOADFOLDER=$FOLDERAvoid special characters in directory-name and ensure the directory exists and has the correct permissions!
Disabling Shoutbox-Reset after reboot. Since PirateBox 1.0 there is a command in installpiratebox.sh; this is the only thing needed./opt/piratebox/bin/installpiratebox.sh /opt/piratebox/conf/piratebox.conf hostname Before PirateBox 1.0: Change hostname in the file index.html /opt/piratebox/www/index.html Your browser does not supprt Iframes. If you want to upload something, follow this Link Custom Directory Listing. Make sure your box has internet, see for informations when you have a single-ethernet-port device like the MR3020.Login to you box using SSH or telnet, then the following lines to install php and dependencies/etc/init.d/piratebox nodnsopkg updateopkg -d ext install extendRoot-php lighttpd-mod-fastcgiThat takes a small moment, then we need to add the corresponding configuration parts to the lighttpd configuration.
Take care, that you copy&paste all of them at once:cat /opt/piratebox/conf/lighttpd/fastcgi.conf (('bin-path' = '/usr/bin/php-cgi','socket' = '/tmp/php.socket','max-procs' = 1)))EOFecho 'include '/opt/piratebox/conf/lighttpd/fastcgi.conf' /opt/piratebox/conf/lighttpd/lighttpd.confecho ' /opt/piratebox/www/phpinfo.phpNow we can do a quick restart of the PirateBox scripts:/etc/init.d/piratebox restartOpen up your browser and then, checkoutAttention, please keep in mind, that with this configuration even an uploadedPHP script would be executed. To restrict this, you can edit the /etc/php.ini fileon your PirateBox and change the value from;docroot = '/www'todocroot = 'In addition, you might need some more extentions to be installed (which isn't that easy to find out).
This can be donewith the commandopkg -d ext install php5-mod-//.//After that, you need to remove the; in fron of the module-name in the dynamic extention section of/etc/php.ini.You can lay down you php files there or in subfolders now. You can lay down your php stuff on the USB-device and link to it. For example a link to my wiki located on the usb device:ln -s /mnt/usb/PirateBox/wiki /opt/piratebox/www/wiki Show connected clients. Included since 0.3.1There is a script, which greps the needed informations from “iw”.
It was designed to run on OpenWRT, but it might work on laptops, too.If you want to use this, run the following command:/opt/piratebox/bin/installpiratebox.sh /opt/piratebox/conf/piratebox.conf stationcntThat makes an entry into the crontab of the current user. It updates a stationcnt.txt file in /opt/piratebox/www every 2 minutes. On OpenWRT you have to ensure, that the Cron daemon runs:/etc/init.d/cron enable && /etc/init.d/cron startAdd the following line in the index.html fileNote: if you try to do the activation on the RPi version, you need to execute the following command to enable Cron:sudo systemctl enable croniesudo systemctl start cronie www offload.