I builded latest trunk image OpenWRT (r16437) for Metarouter with new patch.
And wait final v.3.25, with doesn’t has bug with hardlinks:
MT support writed me:
here was a problem with hardlinks. It will be fixed in v3.25 also
to fix the problem you will need to rebuild latest trunk with new patch.
My image contains base files and 2 extra packages: mc(with subshell support) and bash:
root@OpenWrt:~# opkg list_installed
base-files-metarouter - 22-r16437 -
bash - 3.2-2 -
busybox - 1.13.4-1 -
dnsmasq - 2.49-1 -
dropbear - 0.52-2 -
dropbearconvert - 0.52-2 -
firewall - 1-3 -
glib1 - 1.2.10-1 -
hotplug2 - 1.0-beta-3 -
iptables - 1.4.3.2-1 -
iptables-mod-conntrack - 1.4.3.2-1 -
iptables-mod-nat - 1.4.3.2-1 -
kernel - 2.6.27.21-metarouter-1 -
kmod-crc-ccitt - 2.6.27.21-metarouter-1 -
kmod-ipt-conntrack - 2.6.27.21-metarouter-1 -
kmod-ipt-core - 2.6.27.21-metarouter-1 -
kmod-ipt-nat - 2.6.27.21-metarouter-1 -
kmod-ipt-nathelper - 2.6.27.21-metarouter-1 -
kmod-ppp - 2.6.27.21-metarouter-1 -
kmod-pppoe - 2.6.27.21-metarouter-1 -
libc - 0.9.30.1-22 -
libgcc - 4.1.2-22 -
libiptc - 1.4.3.2-1 -
liblua - 5.1.4-3 -
libncurses - 5.7-1 -
libpthread - 0.9.30.1-22 -
librt - 0.9.30.1-22 -
libuci - 0.7.5-1 -
libuci-lua - 0.7.5-1 -
libxtables - 1.4.3.2-1 -
mc - 4.6.1-2 -
mtd - 8 -
opkg - 4993-4 -
ppp - 2.4.4-1 -
ppp-mod-pppoe - 2.4.4-1 -
uci - 0.7.5-1 -
ucitrigger - 0.7.5-1 -
udevtrigger - 106-1 -
root@OpenWrt:~#
You can try this image.
Many extra packages here
Basic setting – network:
Use openwrt tool UCI or you can manual edit file /etc/config/network
Prepare: don’t forget setup correct interface to current system in metarouter setting (look wiki),
for check try:
root@OpenWrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 02:7F:3D:7B:EA:22
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:577 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100557 (98.2 KiB) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 02:7F:3D:7B:EA:22
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:833 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:118339 (115.5 KiB) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1632 (1.5 KiB) TX bytes:1632 (1.5 KiB)
If you see it – you can start next step.
-
show current setting:
root@OpenWrt:/# uci show network.lan
network.lan=interface
network.lan.ifname=eth0
network.lan.type=bridge
network.lan.proto=static
network.lan.netmask=255.255.255.0
network.lan.ipaddr=192.168.1.1
-
setting your define IP setting:
uci set network.lan.ipaddr=“192.168.1.3”
uci set network.lan.netmask=“255.255.255.0”
uci set network.lan.gateway=“192.168.1.254”
uci set network.lan.dns=“192.168.1.254”
uci commit
-
fixed DNS for static IP setup
default install file /etc/resolv.conf has symlink to /tmp/resolv.conf
root@OpenWrt:/# cat /etc/resolv.conf
nameserver 127.0.0.1
we need to stop and disable dnsmasq demon
root@OpenWrt:/# /etc/init.d/dnsmasq stop
root@OpenWrt:/# /etc/init.d/dnsmasq disable
After it will be create symlink from /tmp/resolv.conf to /tmp/resolv.conf.auto
-
set define hostname:
root@OpenWrt:/# uci show system
system.@system[0]=system
system.@system[0].timezone=UTC
system.@system[0].hostname=OpenWrt
root@OpenWrt:/# uci set system.@system[0].hostname=“Metarouter”
root@OpenWrt:/# uci commit
root@OpenWrt:/etc# uci show system
system.@system[0]=system
system.@system[0].timezone=UTC
system.@system[0].hostname=Metarouter
-
Now we have correct LAN setting: ip address, default gw, DNS, hostname
Basic setting – change root password:
As command “passwd” doesn’t work correct yet – manual edit file /etc/password to setup password “123”
before edit:
root@OpenWrt:~# cat /etc/passwd
root:!:0:0:root:/root:/bin/bash
nobody::65534:65534:nobody:/var:/bin/false
daemon::65534:65534:daemon:/var:/bin/false
after edit:
root@OpenWrt:~# cat /etc/passwd
root:$1$8PdvdwlZ$NfvLlnxRnNpf9GkAH4ajU1:0:0:root:/root:/bin/bash
nobody::65534:65534:nobody:/var:/bin/false
daemon::65534:65534:daemon:/var:/bin/false
Now time take reboot and apply all new setting:
- enable ssh access
- disable telnet access
- activated your define LAN setting
root@OpenWrt:~# reboot
Now we have remote ssh access with login “root” and password “123” and working LAN setting:
root@Metarouter:~# ping google.com -c 3
PING google.com (74.125.127.100): 56 data bytes
64 bytes from 74.125.127.100: seq=0 ttl=239 time=191.389 ms
64 bytes from 74.125.127.100: seq=1 ttl=239 time=191.942 ms
64 bytes from 74.125.127.100: seq=2 ttl=239 time=195.998 ms
— google.com ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 191.389/193.109/195.998 ms
Basic setting – packages system:
Now you can install manual any packages:
root@Metarouter:~# opkg install http://openwrt.pantele.com.ua/trunk/metarouter/packages/screen_4.0.3-1_mips.ipk
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/screen_4.0.3-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
screen_4.0.3-1_mips. 100% |****************************************************************************| 154k --:–:-- ETA
Installing screen (4.0.3-1) to root…
Configuring screen
root@Metarouter:~#
But for resolve many dependences recommend setup correct repo:
- add to /etc/opkg.conf
root@Metarouter:~#echo “src/gz metarouter http://openwrt.pantele.com.ua/trunk/metarouter/packages” >> /etc/opkg.conf
- comment not working repo in file /etc/opkg.conf:
#src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/metarouter/packages
after it look your /etc/opkg.conf:
root@Metarouter:~# cat /etc/opkg.conf
#src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/metarouter/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /jffs
src/gz metarouter http://openwrt.pantele.com.ua/trunk/metarouter/packages
-
update packages list first:
root@Metarouter:~# opkg update
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/Packages.gz
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
Packages.gz 100% |****************************************************************************| 29394 --:–:-- ETA
Inflating http://openwrt.pantele.com.ua/trunk/metarouter/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/metarouter
root@Metarouter:~#
-
look available packages for install:
root@Metarouter:~# opkg list
apache - 2.2.9-2 - The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
apache-icons - 2.2.9-2 - The Apache Web Server is a powerful and flexible HTTP/1.1 compliant
asterisk14 - 1.4.25.1-1 - Asterisk is a complete PBX in software. It provides all of the features
.
.
-
now you can install any available packages (nmap for exp.):
root@Metarouter:~# opkg install nmap
Installing nmap (4.20-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/nmap_4.20-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
nmap_4.20-1_mips.ipk 100% || 565k --:–:-- ETA
Installing libdnet (1.10-2) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/libdnet_1.10-2_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
libdnet_1.10-2_mips. 100% || 24308 --:–:-- ETA
Installing libpcap (1.0.0-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/libpcap_1.0.0-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
libpcap_1.0.0-1_mips 100% || 74679 --:–:-- ETA
Installing libpcre (7.9-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/libpcre_7.9-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
libpcre_7.9-1_mips.i 100% || 51675 --:–:-- ETA
Installing uclibcxx (0.2.2-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/uclibcxx_0.2.2-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
uclibcxx_0.2.2-1_mip 100% |****************************************************************************| 59989 --:–:-- ETA
Configuring libdnet
Configuring libpcap
Configuring libpcre
Configuring nmap
Configuring uclibcxx
root@Metarouter:~#
root@Metarouter:~# nmap localhost
Starting Nmap 4.20 ( http://insecure.org ) at 1970-01-01 00:06 UTC
Interesting ports on localhost. (127.0.0.1):
Not shown: 1694 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
Nmap finished: 1 IP address (1 host up) scanned in 2.050 seconds
root@Metarouter:~#
- example installation X-WRT to Metarouter:
root@Metarouter:~# opkg install webif
Installing webif (0.3-4754) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/webif_0.3-4754_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
webif_0.3-4754_mips. 100% || 164k --:–:-- ETA
Installing haserl (0.9.25-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/haserl_0.9.25-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
haserl_0.9.25-1_mips 100% || 12132 --:–:-- ETA
Configuring haserl
Configuring webif
cat: can’t open ‘/proc/mtd’: No such file or directory
Collected errors:
- Could not obtain administrative lock
Committing new firmware id …
SUCCESS! Webif^2 installation appears OK. Welcome to X-Wrt!
You may need to do a hard REFRESH to clear old CSS style from your browser.
Reinitializing httpd …
root@Metarouter:~#
- Don’t forget install ntpclient – doesn’t include in def.image
root@Metarouter:/etc/config# opkg update
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/Packages.gz
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
Packages.gz 100% || 29394 --:–:-- ETA
Inflating http://openwrt.pantele.com.ua/trunk/metarouter/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/metarouter
root@Metarouter:/etc/config#
root@Metarouter:~# opkg install ntpclient
WARNING: Ignoring unknown configuration parameter: trunk/trunk
Installing ntpclient (2007_365-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/ntpclient_2007_365-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
ntpclient_2007_365-1 100% || 11493 --:–:-- ETA
Configuring ntpclient
root@Metarouter:~#
8 ) I want test VoIP and I installed asterisk 1.4 too:
root@Metarouter:/etc/config# opkg install asterisk14
Installing asterisk14 (1.4.25.1-1) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/asterisk14_1.4.25.1-1_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
asterisk14_1.4.25.1- 100% || 1291k --:–:-- ETA
Installing libpopt (1.7-4) to root…
Downloading http://openwrt.pantele.com.ua/trunk/metarouter/packages/libpopt_1.7-4_mips.ipk
Connecting to openwrt.pantele.com.ua (91.206.252.20:80)
libpopt_1.7-4_mips.i 100% || 12773 --:–:-- ETA
Configuring asterisk14
Configuring libpopt
root@Metarouter:/etc/config#
root@Metarouter:/etc/config# /etc/init.d/asterisk enable
root@Metarouter:/etc/config# /etc/init.d/asterisk start
root@Metarouter:/etc/config# asterisk -vrc
Asterisk 1.4.25.1, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
Connected to Asterisk 1.4.25.1 currently running on Metarouter (pid = 2357)
Verbosity was 0 and is now 1
MetarouterCLI> iax2 show peers
Name/Username Host Mask Port Status
demo/asterisk 216.207.245.47 (S) 255.255.255.255 4569 Unmonitored
1 iax2 peers [0 online, 0 offline, 1 unmonitored]
MetarouterCLI>
Now we have correct setup LAN setting, time, X-WRT, packages system, same tools (nmap, screen) and VoIP server (asterisk 1.4)
Good luck.
Update:
15.06.2009 – rebuild to latest trunk r16453, ntpclient now in default image, add more packages.
24.06.2009 - rebuild to latest trunk r16549 and tree of packages too.
02.09.2009 - rebuild to latest trunk r17456 and tree of packages too.