piratebox.lan not redirected to 192.168.1.1 on MR3020

Posted by csolus 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:08PM
I installed the latest piratebox on MR3020. Everything seems to work fine except one single thing: apparently the piratebox cannot be accessed as
http://piratebox.lan/...
but only
http://192.168.1.1/...
. The side effects are:

- the main page is not showing the chat window, but it shows a firefox error
unable to connect... can't establish a connexion at [piratebox.lan]
- the links "learn about the project" and "browse and DL files here" are not working, but showing a similar error.

... but I can access all these functions if replacing the addresse by 192.168.1.1:8002 (or resp. 8001).

I'm checked by /etc/host on the router. It seems correct:
 # cat /etc/hosts
127.0.0.1 piratebox.lan localhost
192.168.1.1 piratebox.lan
I'm pretty sure it's a simple thing that I'm missing. Anybody can help me?
thx!!



Edited 1 time(s). Last edit at 05/08/2012 07:16PM by csolus.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:13PM
Please check /etc/config/network - there should be any "dns list" and no "gateway" entries.

Did you do a clean reboot after install?
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:20PM
do you mean I should remove the "dns list" entries and "gateway", so it should look like this?

config 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'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:25PM
yes... it is a current issue :/
If you remove it, it'll work - think so
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:25PM
I used to have 2 dns list entries, but I removed them and rebooted. The problem is still here. Must be something else ;-)
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:28PM
Post this stuff listed here= [github.com]
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:33PM

root@piratebox:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14752k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /mnt/ext type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
/dev/loop1 on /opt/piratebox type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)

root@piratebox:~# ls -la /mnt
drwxr-xr-x    1 root     root             0 Jan  1  1970 .
drwxr-xr-x    1 root     root             0 Jan  1 00:00 ..
drwxr-xr-x    4 root     root          1024 Jan  1 00:05 ext
drwxr-xr-x   12 root     root          8192 Jan  1 00:00 usb

root@piratebox:~# ls -la /mnt/usb/PirateBox 
drwxr-xr-x    3 root     root          8192 Jan  1  1980 .
drwxr-xr-x   12 root     root          8192 Jan  1 00:00 ..
-rwxr-xr-x    1 root     root      20971520 Jan  1 00:09 OpenWRT.img
-rwxr-xr-x    1 root     root      33554432 Jan  1  1980 OpenWRT.swap
drwxr-xr-x    2 root     root          8192 Jan  1  1980 Shared
-rwxr-xr-x    1 root     root      20971520 Jan  1 00:09 pbIMG.img

root@piratebox:~# ls -la /opt/piratebox 
drwxr-xr-x    9 root     root          1024 Jan  1  1970 .
drwxr-xr-x    3 root     root             0 Jan  1 00:00 ..
drwxr-xr-x    2 root     root          1024 Apr  7  2012 bin
drwxr-xr-x    3 root     root          1024 Apr  7  2012 chat
drwxr-xr-x    2 root     root          1024 Jan  1  1970 conf
drwxr-xr-x    2 root     root          1024 Apr  7  2012 init.d
drwx------    2 root     root         12288 Jan  2  1970 lost+found
lrwxrwxrwx    1 root     root            25 Jan  1  1970 share -> /mnt/usb/PirateBox/Shared
drwxr-xr-x    2 root     root          1024 Apr  7  2012 src
drwxr-xr-x    2 root     root          1024 Jan  1  1970 tmp
-rw-r--r--    1 root     root            22 Apr  7  2012 version

root@piratebox:~# cat /opt/piratebox/version
piratebox-scripts_0.4

root@piratebox:~# cat /etc/config/network

config 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'
	option netmask '255.255.255.0'
	option ipaddr '192.168.1.1'

root@piratebox:~# cat /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option macaddr '90:f6:52:47:1c:fa'
	option hwmode '11ng'
	option htmode 'HT20'
	list ht_capab 'SHORT-GI-20'
	list ht_capab 'SHORT-GI-40'
	list ht_capab 'RX-STBC1'
	list ht_capab 'DSSS_CCK-40'
	option disabled '0'

config wifi-iface
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'none'
	option ssid 'PirateBox - Share Freely'

root@piratebox:~# dmesg | tail -n 20 
[   37.040000] usbcore: registered new interface driver ums-sddr09
[   37.060000] usbcore: registered new interface driver ums-sddr55
[   37.080000] usbcore: registered new interface driver ums-usbat
[   39.800000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   39.880000] device wlan0 entered promiscuous mode
[   42.080000] device wlan0 left promiscuous mode
[   42.080000] br-lan: port 1(wlan0) entering disabled state
[   42.300000] device wlan0 entered promiscuous mode
[   49.780000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   50.060000] device eth0 entered promiscuous mode
[   50.730000] EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem
[   50.770000] EXT4-fs (loop0): recovery complete
[   50.780000] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
[   51.130000] Adding 32764k swap on /mnt/usb/PirateBox/OpenWRT.swap.  Priority:-1 extents:1 across:32764k 
[   51.180000] EXT4-fs (loop1): mounting ext3 file system using the ext4 subsystem
[   51.240000] EXT4-fs (loop1): recovery complete
[   51.240000] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null)
[   62.550000] br-lan: port 1(wlan0) entering forwarding state
[   62.550000] br-lan: port 1(wlan0) entering forwarding state
[   77.600000] br-lan: port 1(wlan0) entering forwarding state

root@piratebox:~#  ps
  PID USER       VSZ STAT COMMAND
    1 root      1500 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
   48 root         0 SW   [sync_supers]
   50 root         0 SW   [bdi-default]
   52 root         0 SW<  [kblockd]
   80 root         0 SW   [kswapd0]
  129 root         0 SW   [fsnotify_mark]
  142 root         0 SW<  [ath79-spi]
  154 root         0 SW   [mtdblock0]
  159 root         0 SW   [mtdblock1]
  164 root         0 SW   [mtdblock2]
  169 root         0 SW   [mtdblock3]
  174 root         0 SW   [mtdblock4]
  179 root         0 SW   [mtdblock5]
  219 root         0 SW   [kworker/0:1]
  406 root         0 SWN  [jffs2_gcd_mtd3]
  431 root         0 SW   [khubd]
  442 root         0 SW   [scsi_eh_0]
  443 root         0 SW   [usb-storage]
  444 root         0 SW   [kworker/u:2]
  466 root      1500 S    init
  498 root         0 SW<  [cfg80211]
  581 root         0 SW<  [bat_events]
  616 root      1504 S    /sbin/syslogd -C16
  618 root      1484 S    /sbin/klogd
  620 root       860 S    /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --s
  769 root      1356 S    hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
 1374 root      1496 S    /sbin/watchdog -t 5 /dev/watchdog
 1493 root      1152 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 1525 root         0 SW<  [loop0]
 1527 root         0 SW   [jbd2/loop0-8]
 1528 root         0 SW<  [ext4-dio-unwrit]
 1540 root         0 SW<  [loop1]
 1542 root         0 SW   [jbd2/loop1-8]
 1543 root         0 SW<  [ext4-dio-unwrit]
 1548 nobody     936 S    /usr/sbin/dnsmasq -x /var/run/piratebox_dnsmasq.pid -h -H /opt/piratebox/conf/h
 1553 root      9716 S    python /opt/piratebox/bin/droopy -H piratebox.lan -d /opt/piratebox/share -p /o
 1555 root      6768 S    python /opt/piratebox/bin/webserver.py 8001
 1557 root      7088 S    python pirateboxchat_start.py
 1580 root         0 SW   [flush-8:0]
 1581 root         0 SW   [flush-7:0]
 1583 root         0 SW   [flush-7:1]
 1585 root      1496 S    /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.open
 1786 root      1216 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 1790 root      1504 S    -ash
 1802 root         0 SW   [kworker/0:0]
 1811 root         0 SW   [kworker/0:2]
 1816 root      1492 R    ps



Edited 1 time(s). Last edit at 05/08/2012 07:34PM by csolus.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:44PM
Here's some additional stuff:

# cat /etc/hosts
127.0.0.1 piratebox.lan localhost.
192.168.1.1 piratebox.lan

There's a "." at the endof the first line. No idea why. I removed it: it changed nothing.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:44PM
Can you check If you have defined a static DNS on your client computer?
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:48PM
I am behind a DSL box and my external IP has a dns name, but it should not change anything: I'm connecting to the PB and it is not connected at all to the DSL box.

and:
my_computer:~ > ps -eaf | grep dns
csoler    2102  2065  0 21:46 pts/4    00:00:00 grep dns

there's no dns masq or anything on the client computer. Should I try with another client computer?
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:53PM
I found it ;-)

I previously installed piratebox on my laptop, and I added a few entries in /etc/hosts to make it work, but I forgot to remove them. That when I realised that the current PB works perfectly with my ipod that I remembered it ;-)

Thank you very much for your help.
This project is a bomb.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:53PM
dnsmasq is providing dhcp & dns service for connected clients.

It does work correctly if your client-computer is connected via ethernet and piratebox-wifi only. Redirection is based on DNS resolution from dnsmasq running on the PirateBox
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 07:53PM
lol
Ok, Have fun with it smiling smiley


This is only my signature.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 08, 2012 09:01PM
I'm having this same problem. I removed the dns list entries from my /etc/config/network file.

Additionally the box does not assign me an IP address. If it is plugged into my router then it gives me an IP address and shows my actual router as the router. If I enter the IP address directly in the browser then it gives me part of the PirateBox page, but the rest fails because it is trying to go to piratebox.lan which fails the DNS lookup.

If I disconnect it from the router, and then power cycle it, connecting to the PirateBox wifi then it does not give me an IP address via DHCP. If I hardcode an IP address on the same subnet then I cannot see it via ping, SSH, Telnet, HTTP, etc.

I've rebuilt the box a few times, but keep failing at this point.

I am using the MR3020 and running the firmware from [forum.daviddarts.com]

I from the base configuration I just changed the IP address to 192.168.0.111

Connecting via WiFi or Ethernet produces the same results.

Language: PHP
root@piratebox:~# mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14752k) tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,noatime,mode=600) /dev/mtdblock3 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay) debugfs on /sys/kernel/debug type debugfs (rw,relatime) none on /proc/bus/usb type usbfs (rw,relatime) /dev/sda1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) /dev/loop0 on /mnt/ext type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered) /dev/loop1 on /opt/piratebox type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered) root@piratebox:~# ls -la /mnt/ drwxr-xr-x 1 root root 0 May 8 2012 . drwxr-xr-x 1 root root 0 Jan 1 00:10 .. drwxr-xr-x 4 root root 1024 Jan 1 00:07 ext drwxr-xr-x 2 root root 0 May 8 2012 sdb1 drwxr-xr-x 3 root root 4096 Jan 1 00:00 usb root@piratebox:~# ls -la /mnt/usb drwxr-xr-x 3 root root 4096 Jan 1 00:00 . drwxr-xr-x 1 root root 0 May 8 2012 .. drwxr-xr-x 3 root root 4096 Jan 1 1980 PirateBox -rwxr-xr-x 1 root root 104814 Jan 1 1980 piratebox_img.gz root@piratebox:~# ls -la /mnt/usb/PirateBox drwxr-xr-x 3 root root 4096 Jan 1 1980 . drwxr-xr-x 3 root root 4096 Jan 1 00:00 .. -rwxr-xr-x 1 root root 20971520 Jan 1 00:00 OpenWRT.img -rwxr-xr-x 1 root root 33554432 Jan 1 1980 OpenWRT.swap drwxr-xr-x 2 root root 4096 Jan 1 1980 Shared -rwxr-xr-x 1 root root 20971520 Jan 1 00:00 pbIMG.img root@piratebox:~# ls -la /opt/piratebox drwxr-xr-x 9 root root 1024 Jan 1 00:10 . drwxr-xr-x 3 root root 0 Jan 1 00:10 .. drwxr-xr-x 2 root root 1024 Apr 7 2012 bin drwxr-xr-x 3 root root 1024 Apr 7 2012 chat drwxr-xr-x 2 root root 1024 Jan 1 00:10 conf drwxr-xr-x 2 root root 1024 Apr 7 2012 init.d drwx------ 2 root root 12288 Jan 2 1970 lost+found lrwxrwxrwx 1 root root 25 Jan 1 00:10 share -> /mnt/usb/PirateBox/Shared drwxr-xr-x 2 root root 1024 Apr 7 2012 src drwxr-xr-x 2 root root 1024 Jan 1 00:10 tmp -rw-r--r-- 1 root root 22 Apr 7 2012 version root@piratebox:~# cat /opt/piratebox/version piratebox-scripts_0.4 root@piratebox:~# cat /etc/config/network config 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'; option netmask ';255.255.255.0'; option gateway ';192.168.0.1'; option ipaddr ';192.168.0.111';   root@piratebox:~# cat /etc/config/wireless config wifi-device ';radio0'; option type ';mac80211'; option channel ';11'; option macaddr ';f8:d1:11:9e:84:30'; option hwmode ';11ng'; option htmode ';HT20'; list ht_capab ';SHORT-GI-20'; list ht_capab ';SHORT-GI-40'; list ht_capab ';RX-STBC1'; list ht_capab ';DSSS_CCK-40'; option disabled ';0';   config wifi-iface option device ';radio0'; option network ';lan'; option mode ';ap'; option encryption ';none'; option ssid ';PirateBox - Share Freely';   root@piratebox:~# dmesg | tail -n 20 [ 42.100000] device wlan0 left promiscuous mode [ 42.100000] br-lan: port 1(wlan0) entering disabled state [ 42.320000] device wlan0 entered promiscuous mode [ 49.970000] ADDRCONF(NETDEV_UP): eth0: link is not ready [ 50.230000] device eth0 entered promiscuous mode [ 50.790000] EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem [ 50.830000] EXT4-fs (loop0): recovery complete [ 50.830000] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null) [ 51.230000] Adding 32764k swap on /mnt/usb/PirateBox/OpenWRT.swap. Priority:-1 extents:1 across:32764k [ 51.290000] EXT4-fs (loop1): mounting ext3 file system using the ext4 subsystem [ 51.350000] EXT4-fs (loop1): recovery complete [ 51.350000] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null) [ 62.440000] br-lan: port 1(wlan0) entering forwarding state [ 62.440000] br-lan: port 1(wlan0) entering forwarding state [ 77.480000] br-lan: port 1(wlan0) entering forwarding state [ 696.930000] eth0: link up (100Mbps/Full duplex) [ 696.930000] br-lan: port 2(eth0) entering forwarding state [ 696.930000] br-lan: port 2(eth0) entering forwarding state [ 696.940000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 711.960000] br-lan: port 2(eth0) entering forwarding state root@piratebox:~# ps PID USER VSZ STAT COMMAND 1 root 1500 S init 2 root 0 SW [kthreadd] 3 root 0 SW [ksoftirqd/0] 5 root 0 SW [kworker/u:0] 6 root 0 SW< [khelper] 48 root 0 SW [sync_supers] 50 root 0 SW [bdi-default] 52 root 0 SW< [kblockd] 80 root 0 SW [kswapd0] 129 root 0 SW [fsnotify_mark] 142 root 0 SW< [ath79-spi] 154 root 0 SW [mtdblock0] 159 root 0 SW [mtdblock1] 164 root 0 SW [mtdblock2] 169 root 0 SW [mtdblock3] 174 root 0 SW [mtdblock4] 179 root 0 SW [mtdblock5] 219 root 0 SW [kworker/0:1] 407 root 0 SWN [jffs2_gcd_mtd3] 432 root 0 SW [khubd] 443 root 0 SW [scsi_eh_0] 444 root 0 SW [usb-storage] 445 root 0 SW [kworker/u:2] 467 root 1500 S init 498 root 0 SW< [cfg80211] 581 root 0 SW< [bat_events] 616 root 1504 S /sbin/syslogd -C16 618 root 1484 S /sbin/klogd 620 root 860 S /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.ru 768 root 1356 S hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf 1380 root 1496 S /sbin/watchdog -t 5 /dev/watchdog 1493 root 1152 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22 1525 root 0 SW< [loop0] 1527 root 0 SW [jbd2/loop0-8] 1528 root 0 SW< [ext4-dio-unwrit] 1540 root 0 SW< [loop1] 1542 root 0 SW [jbd2/loop1-8] 1543 root 0 SW< [ext4-dio-unwrit] 1548 nobody 936 S /usr/sbin/dnsmasq -x /var/run/piratebox_dnsmasq.pid -h -H /opt/piratebox 1553 root 7668 S python /opt/piratebox/bin/droopy -H piratebox.lan -d /opt/piratebox/shar 1555 root 6768 S python /opt/piratebox/bin/webserver.py 8001 1557 root 7060 S python pirateboxchat_start.py 1570 root 1496 S /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 1764 root 0 SW [kworker/0:2] 1765 root 0 SW [kworker/0:0] 1766 root 1216 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22 1767 root 1216 R /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22 1768 root 1500 S -ash 1783 root 1492 R ps root@piratebox:~#

Thanks!
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 09, 2012 04:36AM
Hi,
yes changing the IP the problem.
You have to modify the following configs to allow it:

/opt/piratebox/conf/piratebox.conf
-> IP & IPSTART & IPEND
/opt/piratebox/conf/hosts

I've already some plans in my pocket to get the problem solved automatically too winking smiley

Matthias
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 09, 2012 03:28PM
That did it. Thanks!
Hello everybody, i have the same problems and then check my configuration and don't find what is wrong ....

root@piratebox:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,size=14752k)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,relatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /mnt/ext type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
/dev/loop1 on /opt/piratebox type ext3 (rw,sync,relatime,user_xattr,barrier=1,nodelalloc,data=ordered)
root@piratebox:~# ls -la /mnt
drwxr-xr-x    1 root     root             0 May 16  2012 .
drwxr-xr-x    1 root     root             0 May 16  2012 ..
drwxr-xr-x    4 root     root          1024 May 16  2012 ext
drwxr-xr-x    3 root     root         32768 Jan  1 00:00 usb
root@piratebox:~# ls -la /mnt/usb/Piratebox
drwxr-xr-x    3 root     root         32768 May 16  2012 .
drwxr-xr-x    3 root     root         32768 Jan  1 00:00 ..
-rwxr-xr-x    1 root     root      20971520 Jan  1 00:12 OpenWRT.img
-rwxr-xr-x    1 root     root      33554432 May 16  2012 OpenWRT.swap
drwxr-xr-x    2 root     root         32768 Jan  1  1980 Shared
-rwxr-xr-x    1 root     root      20971520 Jan  1 00:31 pbIMG.img
root@piratebox:~# ls -la /opt/piratebox
drwxr-xr-x   10 root     root          1024 Jan  1 00:41 .
drwxr-xr-x    3 root     root             0 May 16  2012 ..
drwxr-xr-x    2 root     root          1024 Jan  1  1970 bin
drwxr-xr-x    3 root     root          1024 Jan  1 00:41 chat
drwxr-xr-x    2 root     root          1024 Jan  1  1970 conf
drwxrwxrwx    2 root     root          1024 Jan  1 00:41 forumspace
drwxr-xr-x    2 root     root          1024 Apr  7  2012 init.d
drwx------    2 root     root         12288 Jan  2  1970 lost+found
lrwxrwxrwx    1 root     root            25 May 16  2012 share -> /mnt/usb/PirateBox/Shared
drwxr-xr-x    2 root     root          1024 Jan  1  1970 src
drwxr-xr-x    2 root     root          1024 Jan  1 00:00 tmp
-rw-r--r--    1 root     root            22 Apr  7  2012 version
root@piratebox:~# cat /opt/piratebox/version
piratebox-scripts_0.4
root@piratebox:~# cat /etc/config/network

config 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'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.1'

root@piratebox:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option macaddr 'f8:d1:11:bd:6a:82'
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option encryption 'none'
        option ssid 'PirateBox - Share Freely'

root@piratebox:~# dmesg | tail -n 20
[   42.360000] device wlan0 entered promiscuous mode
[   49.970000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   50.190000] device eth0 entered promiscuous mode
[   50.790000] EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem
[   50.830000] EXT4-fs (loop0): recovery complete
[   50.830000] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
[   51.160000] Adding 32764k swap on /mnt/usb/PirateBox/OpenWRT.swap.  Priority:-1 extents:1 across:32764k
[   51.210000] EXT4-fs (loop1): mounting ext3 file system using the ext4 subsystem
[   51.320000] EXT4-fs (loop1): recovery complete
[   51.320000] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null)
[   63.970000] br-lan: port 1(wlan0) entering forwarding state
[   63.970000] br-lan: port 1(wlan0) entering forwarding state
[   79.000000] br-lan: port 1(wlan0) entering forwarding state
[  280.420000] eth0: link up (100Mbps/Full duplex)
[  280.420000] br-lan: port 2(eth0) entering forwarding state
[  280.420000] br-lan: port 2(eth0) entering forwarding state
[  280.430000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  295.440000] br-lan: port 2(eth0) entering forwarding state
[ 1847.280000] eth0: link down
[ 1847.280000] br-lan: port 2(eth0) entering forwarding state
root@piratebox:~# ps
  PID USER       VSZ STAT COMMAND
    1 root      1500 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
   48 root         0 SW   [sync_supers]
   50 root         0 SW   [bdi-default]
   52 root         0 SW<  [kblockd]
   80 root         0 SW   [kswapd0]
  129 root         0 SW   [fsnotify_mark]
  142 root         0 SW<  [ath79-spi]
  154 root         0 SW   [mtdblock0]
  159 root         0 SW   [mtdblock1]
  164 root         0 SW   [mtdblock2]
  169 root         0 SW   [mtdblock3]
  174 root         0 SW   [mtdblock4]
  179 root         0 SW   [mtdblock5]
  380 root         0 SW   [kworker/0:2]
  407 root         0 SWN  [jffs2_gcd_mtd3]
  432 root         0 SW   [khubd]
  443 root         0 SW   [scsi_eh_0]
  444 root         0 SW   [usb-storage]
  446 root         0 SW   [kworker/u:2]
  468 root      1500 S    init
  499 root         0 SW<  [cfg80211]
  582 root         0 SW<  [bat_events]
  617 root      1504 S    /sbin/syslogd -C16
  619 root      1484 S    /sbin/klogd
  621 root       860 S    /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug
  768 root      1356 S    hostapd -P /var/run/wifi-phy0.pid -B /var/run/hostapd-phy0.conf
 1380 root      1496 S    /sbin/watchdog -t 5 /dev/watchdog
 1494 root      1152 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 1526 root         0 SW<  [loop0]
 1528 root         0 SW   [jbd2/loop0-8]
 1529 root         0 SW<  [ext4-dio-unwrit]
 1541 root         0 SW<  [loop1]
 1543 root         0 SW   [jbd2/loop1-8]
 1544 root         0 SW<  [ext4-dio-unwrit]
 1549 nobody     936 S    /usr/sbin/dnsmasq -x /var/run/piratebox_dnsmasq.pid -h -H /opt/piratebox/conf/hosts -R --a
 1554 root     13812 S    python /opt/piratebox/bin/droopy -H piratebox.lan -d /opt/piratebox/share -p /opt/piratebo
 1556 root      9128 S    python /opt/piratebox/bin/webserver.py 8001
 1558 root      7084 S    python pirateboxchat_start.py
 1571 root      1496 S    /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.nt
 1841 root      1216 R    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 1842 root      1500 S    -ash
 1862 root         0 SW   [kworker/0:1]
 1865 root         0 SW   [kworker/0:0]
 1868 root      1492 R    ps

Can you help me to understand what is wrong ?? have you an idea for my problem?

No static IP on my laptotp (test with two different).

Thank's in advance for your help.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 18, 2012 09:04PM
can you please post the result of
cat /opt/piratebox/conf/hosts
ifconfig

and from your connected laptop

nslookup piratebox.lan
nslookup google.de


Thank you
Matthias
Hi,

thanks for the response.

this is the result of the command:

root@piratebox:~# cat /opt/piratebox/conf/hosts
#192.168.1.1  piratebox.lan
192.168.1.1  piratebox.lan
127.0.0.1 piratebox.lan localhost.
root@piratebox:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr F8grinning smiley1:11:BD:6A:82
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::fad1:11ff:febd:6a82/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:218 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:19968 (19.5 Kicool smiley  TX bytes:23010 (22.4 Kicool smiley

eth0      Link encap:Ethernet  HWaddr F8grinning smiley1:11:BD:6A:82
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 cool smiley  TX bytes:0 (0.0 cool smiley
          Interrupt:4

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:114 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9954 (9.7 Kicool smiley  TX bytes:9954 (9.7 Kicool smiley

mon.wlan0 Link encap:UNSPEC  HWaddr F8-D1-11-BD-6A-82-00-48-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:505 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:148101 (144.6 Kicool smiley  TX bytes:0 (0.0 cool smiley

wlan0     Link encap:Ethernet  HWaddr F8grinning smiley1:11:BD:6A:82
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:217 errors:0 dropped:0 overruns:0 frame:0
          TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:23000 (22.4 Kicool smiley  TX bytes:33950 (33.1 Kicool smiley

root@piratebox:~#



C:\Documents and Settings\testeur>nslookup piratebox.lan
Serveur :  piratebox.lan
Address:  192.168.1.1

Nom :    piratebox.lan
Addresses:  127.0.0.1, 192.168.1.1


C:\Documents and Settings\testeur>nslookup google.de
Serveur :  piratebox.lan
Address:  192.168.1.1

Nom :    google.de
Address:  192.168.1.1

I search solution yesterday night and i think i was in the bad topic.

I think there's a problem of direction because link on piratebox don't work (for READ.ME and BACK.TO.MENU).

I shearch solution on the forum and found tahat topic topic for READ.ME

then i check my usb key to verify if i'm not in ro by this command
root@piratebox:~# mount | grep /mnt/usb
/dev/sda1 on /mnt/usb type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
root@piratebox:~#

I think it's OK.

then i check my shared folder and i see the hide link for READ.ME and BACK.TO.MENU link.
0 Ko for the twoo link

If i copy the original link (when i recover the original direction) to the shared folder, do you think it's OK ?

Or i should reinstall the piratebox ?

thank's for your help, i prefer waiting for your response before modify something because i don't know if it's the real problem.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
May 19, 2012 08:30AM
if something went wrong on copying the files to your shared directory, you can copy them by hand:

cp /opt/piratebox/src/.READ.ME.htm /opt/piratebox/share
cp /opt/piratebox/src/.BACK.TO.MENU.htm /opt/piratebox/share

but what exactly is your problem?



Edited 1 time(s). Last edit at 05/19/2012 08:31AM by Matthias.
My problem is

When i click on link connect to piratebox, there'is blank screen with READ.ME and BACK.TO.MENU.

Then i search for a solution myself and reading a LOOOOT OF topic to understand myself before annoyed you with my problem.

at first, i think it was a problem of "redirect piratebox.lan with 192.168.1.1" (wrong direction for the link on piratebox).

Then i wrote the first message above because i don't understand what happen.confused smiley

Since yesterday i tried to understand again, and give you the information you need.eye popping smiley

With recheck of installation:
then i check my shared folder and i see the hide link for READ.ME and BACK.TO.MENU link.
0 Ko for the twoo link

In second time, i suppose it was a bad copy of the link in share folder.eye rolling smiley

Then i made a new copy of the original and the link work (with the last command which you wrote above).grinning smiley

Thank's for your help, it's solved for me without re-instalation of the piratebox.thumbs upsmileys with beer
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
October 14, 2012 08:47PM
I managed to get the box to work with Matt's repository, but now I am running into redirection issues. If I type in the IP directly, I can access the piratebox page. If I type something else in, it fails.

Nslookup piratebox.lan while ssh'd over wireless replies...

Server: 0.0.0.0
Address 1: 0.0.0.0

Name: piratebox.lan
Address 1: 127.0.0.1 piratebox.lan

I would be glad to post the results of the mount command as well, if necessary.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
October 15, 2012 04:28AM
is this the output of your "nslookup" on your client-computer?
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
October 15, 2012 02:20PM
Yes. I connected my laptop (client) to the 'box and ssh'd in, testing the nslookup command at that point. I am currently in class, but can perform more troubleshooting operations later today.
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
October 21, 2012 02:57AM
Oddly enough, I decided to run a test on battery power... Suddenly things are working fine. I guess that will remain an unsolved mystery. Thank you for the wonderful support and guides.
I can not connect to the mr3020 via telnet or ssh. the box worked perfect now it wont redirect to pirate box and ip address isnt issued as normal? anyway to save this cool thing or is it borked?
Re: piratebox.lan not redirected to 192.168.1.1 on MR3020
August 10, 2014 11:48AM
Hi,
which kind of box do you have?
if OpenWRT Router based, is it connected via Wire to your homenetwork?
Did you try to get access with setting up a static IP address?


This is only my signature.