Remember: "MiniPwner-mode" is only 1/2 of the functionality of the r00tabaga. This guide shows you how to build that half, by itself.
If you want to re-create a r00tabaga from scratch, you'll need to check out Help! I broke my r00tabaga :(
These instructions for building a MiniPwner (originally created by Kevin Bong), built and tested on the inexpensive but widely revered TP-Link TL-WR703N, work equally well on our TP-Link TL-MR3040.
Kevin Bong's original build instructions have been trimmed to the minimal necessary steps here; his full original post can be found at MiniPwner.com on the Build It page.
MiniPwner Setup Steps:
- Download the OpenWrt image for the TP-Link WMR3040 v1 router from trunk (no longer suggested) or attitude adjustment (recommended). Make sure your device is a v1, as v2 is not yet fully supported by OpenWRT.
Get the file: openwrt-ar71xx-generic-tl-mr3040-v1-squashfs-factory.bin
Also download the MiniPwner community edition scripts from here or here. - Use your computer to repartition and format a USB drive >= 4GB:
Partition 1: linux swap space
Partition2: ext4
Then insert the USB drive into the port on your router. - Configure your local ethernet adapter with a static address of 192.168.1.111 and connect your computer to the router with an ethernet cable.
- Power on the router and browse to 192.168.1.1. User admin password admin.
- Mouseover the left hand links to find the DateTimeCfgRpm.htm link and click. It should be the bottom link in the bullet list on the left.
- Mouseover the expanded menu to find SoftwareUpgradeRpm.htm link and click. It should be the 3rd link from the top of the newly expanded menu.
- Use the dialog to upload the new flash (openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin) to the router. It will go through a 100% status bar twice then reboot.
- On your computer open a command prompt. CD to the directory containing minipwner.tar, and open a netcat listener using "nc -l <minipwner.tar 3333"
- Once the router reboots, telnet to 192.168.1.1:
*** If you mess up anything after this point, enter the command "firstboot" into your telnet session, reboot, and you will be right back here.***
If you computer does not have telnet installed, you can use Putty. - Copy and paste the following commands into your telnet session.
cd /usr/share nc 192.168.1.111 3333 > minipwner.tar
tar -xf minipwner.tar
- Paste these commands into your telnet session:
-
cd /usr/share/minipwner cp -f /etc/config/network /etc/config/network.orig cp -f /etc/config/wireless /etc/config/wireless.orig cp -f /etc/config/firewall /etc/config/firewall.orig cp -f /etc/profile /etc/profile.orig cp -f /etc/config/fstab /etc/config/fstab.orig cp -f /etc/opkg.conf /etc/opkg.conf.orig cp -f /etc/config/system /etc/config/system.orig cp -f /etc/config/dhcp /etc/config/dhcp.orig cp -f ./network.1 /etc/config/network cp -f ./wireless.1 /etc/config/wireless cp -f firewall.1 /etc/config/firewall cat /etc/config/wireless.orig
- Your original /etc/config/wireless file should be displayed on screen. Copy the MAC address of your wireless adapter.
- Edit etc/config/wireless using
vi /etc/config/wireless
Delete the bad MAC address (cursor to it and use x to delete) then paste in the copied MAC (i to insert then paste). Then change the Wifi settings to connect to your wireless router (by default tries to connect to SSID "TOKI"). Shift-ZZ to save and exit. :q! to exit without saving. - Paste these commands into your telnet session:
/etc/init.d/network restart && wifi
- Type
ifconfig wlan0
to check that your wireless settings came up. If you don't have a DHCP assigned address you'll need to troubleshoot your settings. - If your internet connection works you should be able to run "opkg update" and see that it connects and updates packages.
Some people have challenges at this step. One common problem is that their wireless network is in the range 192.168.1.x, which is the same range as eth0. See the MiniPwner forum for options if this is your problem (simple fix is to change the IP range of your wireless network)
- Paste these commands into your telnet session:
cd /usr/share/minipwner opkg update opkg install kernel opkg install kmod-usb-storage opkg install kmod-fs-ext4 opkg install block-mount cp -f profile.1 /etc/profile cp -f fstab.1 /etc/config/fstab cp -f opkg.conf.1 /etc/opkg.conf cp -f system.1 /etc/config/system mkdir /mnt/usb /etc/init.d/fstab enable /etc/init.d/fstab start ls /mnt/usb
- Check that your USB drive mounted. "mount" or "df" commands should show it. If not, you'll need to troubleshoot USB access.
- Paste these commands into your telnet session:
cd /usr/share/minipwner ln -s /mnt/usb /opt ln -s /etc /mnt/usb/etc opkg update opkg install netcat opkg -dest usb install tar opkg -dest usb install openssh-sftp-client opkg -dest usb install nmap opkg -dest usb install tcpdump opkg -dest usb install aircrack-ng opkg -dest usb install kismet-client opkg -dest usb install kismet-server opkg -dest usb install perl opkg -dest usb install openvpn opkg -dest usb install dsniff opkg -dest usb install nbtscan opkg -dest usb install snort opkg -dest usb install karma opkg -dest usb install samba36-client opkg -dest usb install elinks opkg -dest usb install yafc cp -f ./network.2 /etc/config/network cp -f ./wireless.2 /etc/config/wireless cp -f ./dhcp.2 /etc/config/dhcp ln -s /mnt/usb/usr/share/nmap /usr/share/nmap cat /etc/config/wireless.orig
- Your original /etc/config/wireless file should be displayed on the screen. Copy the MAC address of your wireless adapter.
- Edit etc/config/wireless using
vi etc/config/wireless
Delete the bad MAC address (cursor to it and use x to delete) then paste in the copied MAC (i to insert then paste). Shift-ZZ to save and exit. :q! to exit without saving. - Type passwd to set a root password.
- Reboot. The default configuration for the minipwner is acting as a wireless access point with an SSID of TLINK and a router IP of 192.168.50.1, and running DHCP on the ethernet port.
If things get hosed up, see the "rebuilding" section of the FAQ for instructions on using fail-safe mode to rebuild your router. - If you want to install other packages to the USB key, do: opkg -dest usb install <whatever>. I have had problems where installed libraries, modules, or other resources are not found because they are not in the "normal" place. In a lot of cases you can kinda fix this by creating a symlink, similar to the one above for "
ln -s /mnt/usb/usr/share/nmap /usr/share/nmap"
0 Comments