OpenWrt Forum Archive

Topic: Kamikaze - install and basic configuration

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Getting Kamikaze installed is not that difficult, and it only takes a little editing to make it perform basic duties as home router. The following will hopefully be able to help a new-commer to OpenWrt Kamikaze with the setup of a basic functional system.

This howto is based on the use of a Linksys WRT54G version 3.1, which is fully supported by OpenWrt Kamikaze - if you have another device please check http://toh.openwrt.org to see if it is supported. It is assumend that the WRT has either the original firmware installed, or as in this case an older version of OpenWrt White Russian with the original OpenWrt webif. The following process consists of three parts:

1. Installation
2. Gettting access
3. Configuration


######################


1. Installation

There are several ways to install Kamikaze, but this will only cover the very basic procedure based on using the firmware upgrade function of the webinterface (webif).
Thsi means in praxis, that all which is needed to be done is to download the precompiled Kamikaze image and then simply upgrade the device.
Kamikaze supports a rather large number of different platforms (https://dev.openwrt.org/wiki/platforms) so it is required to download the correct image from http://downloads.openwrt.org/kamikaze/7.06/
In the case of the WRT54G the correct image recides in the brcm-2.4/ directory - in this directory the correct file to download would have the name: openwrt-wrt54g-2.4-squashfs.bin

It should be noted that there are two different brcm directories (brcm-2.4/ and brcm47xx-2.6) in the Kamikaze directory - these refer to images based on either 2.4 or 2.6 kernel. But, the 2.6 kernel does presently not support broadcom wireless, and installing the 2.6 image would leave the wireless interface of the WRT54G non-functional.

When the correct image is downloaded, then it is just needed to login to the router (enter the ip-adress of your router in a browser and press return) followed by pointing the firmware upgrade function at the correct image and the pressing of the 'upgrade button'.
*It is always recommended to use a cable connection between router and pc/laptop. The wireless connection can fluctuate and this might result in loss of data during the transfer, which again would leave the router with a non-functional system after reboot.


######################


2. Getting access

Getting the first access to the new Kamikaze system requires that you login to the router via telnet (http://en.wikipedia.org/wiki/Telnet) and set a new login password (on windows you would need to install something like Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/). The default ip-adress of the router is 192.168.1.1, so you would have to check that your pc/laptop has acquired a correct corresponding ip-adress from the router (which should be the case if you'r still connected via ethernet cable). If the ip-adress is not correct, then try to force a re-new of the ip-adress.

The complete login and password setting procedure looks like this -->

----

telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
=== IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
------------------------------------------


BusyBox v1.4.2 (2007-06-01 15:48:27 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (7.06) -----------------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
root@OpenWrt:/# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root
root@OpenWrt:/#

----

Hereafter it is needed to logout, to close the telnet connection (which is insecure), and instead use the ssh service for the future (http://en.wikipedia.org/wiki/Secure_Shell). Ths is done like this -->

----

root@OpenWrt:/# exit
Connection closed by foreign host.

ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is 43:6d:51:fc:83:f0:c9:67:67:ac:26:f4:7f:bb:b1:8f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
root@192.168.1.1's password:


BusyBox v1.4.2 (2007-06-01 15:48:27 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (7.06) -----------------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
root@OpenWrt:~#

----

The first time you login to the router the ssh service asks you if the 'fingerprint' of the router should be added to the list of known hosts on your local system. The list of known hosts is a small text file, and should you encounter problems with 'fingerprints' belonging to devices with similar ip-adresses (like: 192.168.1.1) then its a simple task to solve login problems with editing the file by simply removing the entry which results in problems.


######################


3. Configuration

The default configuration of Kamikaze differs at least in two significant aspects:

1. There is no build-in webinterface.
2. The wireless interface is disabled.

This means that the user has to learn how to edit "manually" and in this way enable the wireless interface. The files which needs to be edited recide in the /etc/config directory - and they are named 'network' and 'wireless'

The following will first show how to find the correct files on the Kamikaze system and then how to edit the same files (beginning with login to the system and showing the steps needed + what the content of the different directories are) -->

----

ssh root@192.168.33.1
root@192.168.33.1's password:


BusyBox v1.4.2 (2007-06-01 15:48:27 CEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
|       |.-----.-----.-----.|  |  |  |.----.|  |_
|   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
|_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
KAMIKAZE (7.06) -----------------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
---------------------------------------------------
root@OpenWrt:~#
root@OpenWrt:~# pwd
/tmp

root@OpenWrt:~# ls
dhcp.leases       log               resolv.conf       run
lock              preinit.log       resolv.conf.auto  spool


----

As you can see the default "login position" is in the /tmp directory of the system - the files which needs to be edited are, as mentioned above, in /etc/config so you will need to change directory -->

----

root@OpenWrt:~# cd /etc/

root@OpenWrt:/etc# ls
banner           firewall.user    inittab          passwd-          rc.common
config           functions.sh     ipkg.conf        ppp              rc.d
crontabs         group            modules.d        preinit          resolv.conf
diag.sh          hosts            mtab             preinit.arch     shells
dnsmasq.conf     hotplug.d        openwrt_version  profile          sysctl.conf
dropbear         init.d           passwd           protocols        uci-defaults

root@OpenWrt:/etc# cd config/

root@OpenWrt:/etc/config# ls
dhcp      dropbear  firewall  network   system    wireless

----

The default editor on Kamikaze is 'vi'. This editor is not particular "user-friendly", and you need to know the following commands:

To "open" file:                        vi <name of file>
To make changes in text:        (press key) i
Leaving text-change mode:     (press key) esc
To save and quit:                   :wq

If you just need to look at the content of a file it is more "safe" to use 'less' with these commands:

To "open" file:                        less <name of file>
To "close" file:                        (press key) q

The editing process shoudl then look like this -->

----

root@OpenWrt:/etc# cd /etc/config/

root@OpenWrt:/etc/config# ls                           
dhcp      dropbear  firewall  network   system    wireless

root@OpenWrt:/etc/config# vi wireless

config wifi-device  wl0
        option type     broadcom
        option channel  5
# disable radio to prevent an open ap after reflashing:
        option disabled 1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option hidden   0
        option encryption none

~
~
- wireless 1/14 7%

----

As it says in the file it is needed to comment (add a '#') the line:

option disabled 1

And, when your at it, it is easy to change the wireless ssid to something more personal than OpenWrt, by editing the line:

option ssid   OpenWrt

-----

(here you press 'i' and change the file to something like the following)

config wifi-device  wl0
        option type     broadcom
        option channel  5
# disable radio to prevent an open ap after reflashing:
#       option disabled 1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     Flopper
        option hidden   0
        option encryption none

~
~
- wireless 1/14 7%

(the editing is followed by pressing the 'esc' key - and then typing the following command which will write the changes to file and quit vi)

:wq

----

The wireless interface is now enabled and if you reboot the router and thereafter scan for active wireless networks the ssid of the router is now visible. Though the network file needs a little editing before the wireless part of the LAN is fully functional -->

----

root@OpenWrt:/etc/config# ls                           
dhcp      dropbear  firewall  network   system    wireless

root@OpenWrt:/etc/config# vi network

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    dhcp

~
~
network

----

It is needed to add two additional option to the LAN configuration section of the file before everything will work as expected, it is respectively:

- option gateway
- option dns

which needs to be added -->

----

(so press 'i' and change the LAN configuration section in the following way)


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.33.1
        option netmask  255.255.255.0
        option gateway  192.168.1.254
        option dns      192.168.1.254

(then press the 'esc' key, and the again type)

:wq

----

To finalize this very basic installation and configuration of your new OpenWrt Kamikaze system you just need to reboot - and enjoy smile

It's always a good advice to enable boot_wait, if you should need to recover your WRT54G from a bad firmware upgrade or just need tftp access. So you have to do like this --> http://forum.openwrt.org/viewtopic.php?id=11369

For PPOE/DSL connection try the following settings in /etc/config/network :

config interface        wan
        option ifname   "eth0.1"
        option proto    pppoe
        option username "your-userid@isp-name"
        option password "your-password"
        option keepalive 10
        option mtu      1492

Incase of errors, check logread, you may have to tweak the mtu or comment it.

WEP key encryption

Taking a look at the complete set of options for the wireless configuration file in Kamikaze 7.07 makes a lot visible: https://dev.openwrt.org/browser/trunk/docs/wireless.tex

To configure WEP key encryption it is needed to take a look at the following section -->

config wifi-iface
83         option network  the interface you want wifi to bridge with
84         option device   wifi0, wifi1, wifi2, wifiN
85         option mode     ap, sta, adhoc, or wds
86         option ssid     ssid name
87         option bssid    bssid address
88         option encryption none, wep, psk, psk2, wpa, wpa2
89         option key      encryption key
90         option key1     key 1
91         option key2     key 2
92         option key3     key 3
93         option key4     key 4
94         option server   ip address
95         option port     port
96         option hidden   0,1
97         option isolate  0,1

A simple configuration would look like -->

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     [name of ap]
        option encryption       'wep'
        option hidden   '0'
        option key      '1'
        option key1     '[WEP key in hex]'

Hereafter it (hopefully) would be possible to join the network by entering the correct WEP key (in its plain form).

WPA key encryption

The configuration is very similar to the WEP key setup (and use), and the Kamikaze 7.07 wireless (/etc/config) would look similar to this:

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     [name of ap]
        option encryption       'psk'
        option hidden   '0'
        option key      ['wpa key in plain text']
        option key1     ['wpa key in hex']

hereafter you can either reload wireless or reboot the router to commit the changes :-)

Do you have to have a copy of the wpa passwork in hex?

What happened to the Whiterussian Akm/crypt? Now there appears to be only one choice. I'm uncertain how to program a Kamikaze 707 to connect to a 0.9Whiterussian that uses:

wl0_akm=psk psk2
wl0_crypto=tkip+aes

hello ,

i am on kamikaze 7.06 Busybox 1.4v2   kernel 2.6.19.2 and pretty new to comand line "vi"
but i am willing to learn how the stuff works,

So i have 2 macs with osx behind my Asus ,
192.168.1.102 whitch runs bind and  a wiki

and

192.168.1.23 for Darwin streamer

how do i start configuring a "pppoe " connection and the portforwarding stuff ?


LoneShadow wrote:

For PPOE/DSL connection try the following settings in /etc/config/network :

config interface        wan
        option ifname   "eth0.1"
        option proto    pppoe
        option username "your-userid@isp-name"
        option password "your-password"
        option keepalive 10
        option mtu      1492

after i checked logread i got this error :

"Linux kernel does not support PPPoE are you running 2.4x ? "

and

glp wrote:

option gateway  192.168.1.254
        option dns      192.168.1.254

what adress is this ? i used my static ip adress from ISP and left dns blank is that ok ?

thanks so much

(Last edited by macbroadcast on 2 Aug 2007, 14:56)

I think your error message is pretty plain. You linux kernel does not run pppoe. As you said you have kamikaze 7.06 kernel 2.6.19.2 NOT kernel 2.4! There are two versions, 2.6 apparently does not have working pppoe (according to the message you got) and ALSO does not have working wireless. You should download the 2.4 package of 7.07 and install that.

In terms of the other quote... what context was that? I can pretty much tell you that the gateway and dns settings you reference ARE NOT anything to do with pppoe.

(Last edited by napierzaza on 2 Aug 2007, 03:00)

There are two versions, 2.6 apparently does not have working pppoe  You should download the 2.4 package of 7.07 and install that.

thanks ,

i donĀ“t need wireless yet, but "PPPoE"  is necessary wink

a few minutes ago i  found this  http://forum.openwrt.org/viewtopic.php?id=11808

Hi!
I have a couple of questions about PPPoE that might sound silly but I couldn't get any answer so far...

1. How can I specify a redial period for keepalive?

2. For dial on demand, is the maximum idle time specified in minutes?

Thanks!

BTW: shouldn't this topic be tagged as "sticky"?

More like - it is probably about time to edit and then move it to the wiki ;-)

thanks , very detailed explanation.
One remark:  in the last step , the ip adress has changed to "option ipaddr   192.168.33.1" instead of "option ipaddr   192.168.1.1" , above the gateway option.
I think it is a typo.
regards
Michel

could i use my preferred dns server instead of isp dns in pppoe??

i tried with /etc/resolv.conf but it doesn't work

i see that pppd is launched with "usepeerdns"

there is a uci command to disable that?
option usepeerdns '0' doesn't work

where could i find all uci options? i looked for them in wiki and forum but noway to find it

is there a wiki for kamikazie doco. The wiki doesn't seem to cover kamikaze, only whiterussian releases. I may have missed the link though:)
Cheers

glp wrote:

More like - it is probably about time to edit and then move it to the wiki ;-)

I'm trying to get OpenWRT working and I agree. In fact, I'm going to edit this post for grammer, etc tonight and post it in the Wiki as "Kamikaze Basic Installation"

Arch13 wrote:
glp wrote:

More like - it is probably about time to edit and then move it to the wiki ;-)

I'm trying to get OpenWRT working and I agree. In fact, I'm going to edit this post for grammer, etc tonight and post it in the Wiki as "Kamikaze Basic Installation"

Excellent idea.

And while you're fixing the grammar, don't forget to check the spelling wink

Wodin wrote:
Arch13 wrote:
glp wrote:

More like - it is probably about time to edit and then move it to the wiki ;-)

I'm trying to get OpenWRT working and I agree. In fact, I'm going to edit this post for grammer, etc tonight and post it in the Wiki as "Kamikaze Basic Installation"

Excellent idea.

And while you're fixing the grammar, don't forget to check the spelling wink

Hahahahhahaha. Well played sir. That's what Open office or MS Office 2007 are for of course wink

This post shows how to install Kamikaze from a version which already has webif available.  I've searched, but it's very hard to be comprehensive, and I haven't seen a howto on installing to a WRT54G (v2.2) which has original Linksys software.  If there is such a document, could someone point to it?

Also the opening date on this post is June of 2007. The post states that "the 2.6 kernel does presently not support broadcom wireless"--does that remain the case or can one now use the 2.6 version and have wireless?  I understand that Kamikaze is a moving target, and it is very difficult to keep the documentation current, especially with the many different types of hardware supported.  Forum postings are dated but many Wiki and documentation items give no indication of when they were effective.  Just an observation--but I'll try to update with any information I get, and date the updates.

OK, to answer my own first question, to install Kamikaze from a stock Linksys WRT54G (with an appropriate version number), sign onto the router's web interface and use the "download firmware" option under the "Administration" category.

The discussion might have continued from here.