Instalace Magento
Sorry, this entry is only available in Czech.
As I described here, I’ve bought Asus WL-500g Premium router where I installed Kamikaze 7.09 firmware to. I am running on Linux 2.4 kernel, because 2.6 doesn’t support wifi on my router (see here).
I’d like to connect some USB webcam, but even I spent a lot of time trying to find some usable driver, I didn’t suceed so far.
Here are drivers which are not usable for my case:
These drivers may work:
Copied from this discussion:
Based on this talk, I decided to buy webcam “Labtec webcam pro”. Instructions based on this great tutorial (in polish, but I guess you don’t mind) are following:
usb.c: USB device 2 (vend/prod 0x46d/0x8a2) is not claimed by any active driver.
That sound great, because this vend/prod is supported by spca5xx
ipkg install kmod-usb-core kmod-usb-uhci kmod-usb2ipkg install http://download.czechit.net/openwrt/kmod-usb-spca5xx-le_2.4.34-brcm-1_mipsel.ipk
insmod videodev insmod spca5xx
Linux video capture interface: v1.00 usb.c: registered new driver spca5xx spca_core.c: USB SPCA5XX camera found. Type Labtec Webcam Pro Zc0302 + Hdcs2020 spca_core.c: spca5xx driver 00.57.08LE registered
ls -al /dev/v4l/* ln -s /dev/v4l/video0 /dev/video0 cd /tmp wget http://download.czechit.net/openwrt/spcacat.gz gunzip spcacat.gz mv spcacat /usr/bin chmod +x /usr/bin/spcacat ipkg install libpthread libgcc
spcacat -d /dev/video0 -g -s 640x480 -f jpg -o -N 1 -p 100
Warning: Based on this post, it’s possible that connecting 2 and more cams won’t be easy.
I decided to move to Ubuntu. Here are quick steps:
Honesly, I don’t understand /etc/config/firewall config, coz it’s working pretty strange for port forwarding. I have even found a lot of pages reporting bugs in Kamikaze build during port fw. After several hours, I have found command, which works for Kamikaze - just edit /etc/firewall.user and add:
iptables -t nat -A PREROUTING -p tcp --dport 3535 -j DNAT --to-destination 192.168.1.126:80 iptables -I FORWARD -p tcp --dport 3535 -d 192.168.1.126 -j ACCEPT
Port forwarding using SSH allows you to make virtual TCP port which goes through an SSH connection, even to local networks. There are many tutorials on the net, but they seemed to me complicated…so I wrote this quick tutorial using some example cases. For portforwarding you need a SSH client (for example Putty) and SSH server on the server (for example SSHD running on your router).
There are 2 main port forwarding cases:
When you gonna need this: You have possibility to access some computer in a particular network (it has public IP or port forwarding is enabled on NAT), but you cannot access local computers in that network.
For example: You want to connect from your work to port 80 (webserver) of your home PC with local IP 192.168.1.100. You cannot do this directly, because this IP is hidden in LAN. So you make SSH connection to some device with public IP (e.g. router, server), where SSH server is running and tunnel port from your localhost to 192.168.1.100 port 80.

In the putty on your client computer, you specify hostname of your public IP server.

And then create a record for port forwarding. Port 5050 on your local machine will be forwarded to port 80 at 192.168.1.100 in your home network. Don’t forget to press “Add” button.

Now you can connect to your SSH server using button “Open”. After you successfully login, you can point to address localhost at port 5050 which will be forwarded to 192.168.1.100 at port 80. So in this case, when forwarding webserver port, you may put http://localhost:5050 to your web browser.
When you gonna need this: You are in the local network and you can publish any network’s service to the internet, even if your provider doesn’t have any public IP server nor ssh server.
For example: You are at school and you like FTP server at 192.168.1.100 (port 23). You want to connect to this FTP from your dormitory. You cannot use “local port forwarding”, because school doesn’t have SSH server on public IP or you don’t have access to it. Solution is simple: You forward port 23 to your own ssh server anywhere on the internet.

In the LAN network (where you have access to 192.168.1.100 computer, port 23) you create a SSH connection to hostname of your public accesible SSH server.

In the tunnels settings you specify following. Don’t forget to check “Remote” and “Local ports accept connections from other hosts” (DANGEROUS).

As soon as you establish SSH connection to your public SSH server, anyone from internet can access port 5050 on your SSH server and connect to local computer 192.168.1.100 which was previously protected by NAT. This is ofcourse dangerous, if you don’t know what are you doing.
These connections work as long as the SSH tunel is opened from LAN (school) network.
Because remote port forwarding itself can be pretty dangerous - better solution for this can be combination of both.
Steps:
If any questions, please add comment bellow.
Sorry, this entry is only available in Czech.
Hey guys. Today, I’ve bought a new Asus WL-500g Premium multi functional wireless router. In folowing paragraphs, I’m going to show you, how to uninstall official firmware from Asus and instal open source project OpenWRT based on linux. After that it’s easy to use you router as a rsync, http, ssh, ftp server or as an video surveillance.
Install recipe of OpenWRT to this router is here.
There is just 32 MB of storage and RAM (shared) space. So first we need to install USB drivers to be able to install aditional software to the USB instead of internal Asus’es memory. The tutorial is here.
Attention: FAT doesn’t support symbolic links, so programs cannot be installed to FAT easily. We need to reformat FAT into e.g. EXT3. See folowing steps…
ipkg update
ipkg install kmod-usb2ipkg install kmod-usb-storageipkg install kmod-fs-ext3
reboot
ipkg install e2fsprogsdmesg fdisk -l
ipkg install e2fsprogsmke2fs \ -j /dev/scsi/host0/bus0/target0/lun0/part1
Tool mke2fs may fail on 300GB and bigger disks. Replace “/dev/scsi/host0/bus0/target0/lun0/part1” with your particular location detected by fdisk -l or dmesg
ipkg remove e2fsprogs libuuid
mkdir /mnt/usbmount \ /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb
/etc/init.d/usb enable reboot
As described in this paragraph.
echo dest usb /mnt/usb >> /etc/ipkg.conf
Now you can simply install any sw using these 2 steps:
ipkg -dest usb install libncurses ipkg-link add libncurses
ipkg -dest usb install http://downloads.openwrt.org/.. ..kamikaze/7.06/brcm47xx-2.6/packages/.. ..libreadline_5.1-1_mipsel.ipk ipkg-link add libreadline
ipkg -dest usb install python ipkg-link add libexpat ipkg-link add libopenssl ipkg-link add libpthread ipkg-link add uclibcxx ipkg-link add zlib ipkg-link add python
ipkg -dest usb install joe ipkg-link add joe
There is already installed httpd server as a part of BusyBox. You just need to reconfigure it.
[ -d /mnt/usb/www ] && httpd -p 80 \ -h /mnt/usb/www -r ${hostname:-OpenWrt}
/etc/init.d/httpd enable reboot
#!/usr/bin/python print "Content-Type: text/html; charset=ISO-8859-2\n\n" import os import httplib import datetime def run(cmd): d = datetime.datetime.now() print '<pre>' toChild, fromChild, childError = os.popen3(cmd) for l in fromChild: print l, print '</pre> Duration: %s' % (datetime.datetime.now() - d) print ' <h2>uptime</h2> ' run('uptime') print ' <h2>ps</h2> ' run('ps') print ' <h2>df</h2> ' run('df') print ' <h2>cpu info</h2> ' run('cat /proc/cpuinfo') print ' <h2>netstat</h2> ' run('netstat')
uci set wireless.wl0.disabled=0 uci set wireless.cfg2.encryption=psk2 uci set wireless.cfg2.key=some_long_key uci set wireless.cfg2.ssid=mySSID uci commit wireless && wifi
#!/bin/sh /etc/rc.common # The macfilter 2 means that the filter works in "Allow" mode. # Other options are: 0 - disabled, or 1 - Deny. # wlc ifname wl0 maclist "xx:xx:xx:xx:xx:xx xx:xx:xx:xx:xx:xx" START=47 start() { wlc ifname wl0 maclist "xx:xx:xx:xx:xx:xx" wlc ifname wl0 macfilter 2 } stop() { wlc ifname wl0 maclist none wlc ifname wl0 macfilter 0 }
Then do following commands:
chmod 755 /etc/init.d/wlmacfilter /etc/init.d/wlmacfilter enable reboot
Sorry, this entry is only available in Czech.