No route to host - PLEASE HELP!!!

Posted by JayPee 
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
No route to host - PLEASE HELP!!!
March 27, 2017 06:44PM
So, I had my pirate box up and running perfectly. Then I found this article that showed me how to be able to edit the html and png files for a custom version of pirate box. I could not resist. The article said to create a www_alt directory on the usb drive and then plug in the usb drive to the pirate box and run these three commands in the terminal:

/etc/init.d/piratebox stop
/etc/init.d/piratebox updatePB
/etc/init.d/piratebox start

The stop line worked, the updatePB line errored that it could not find the img on the web, and the start line did not work. Now when I try to ssh into my pirate box I get the message "No route to host". I have figured that the updatePB line deleted the img before going to the web to see about the new img file.

Please HELP!!! I either need to get the img files back or just do a total reinstall, but I do not know how. Thank you in advance for any help!



Edited 1 time(s). Last edit at 03/27/2017 06:45PM by JayPee.
Re: No route to host - PLEASE HELP!!!
March 27, 2017 08:21PM
Hi,
you howto was out of date and the www_alt option is obsolete and disabled.

You can place a new install folder and connect to your box via a static IP, and rerun the updatePB command.
Of just do an easiy Auto reflash.
You should consider deleting the PirateBox folder on the USB stick...

BTW: you can just take the USB stick from your box (when it is turned off) and modify the content of the <usb>/PirateBox/content folder, which contains the webpage.

be aware of redirect loops in case of 404 errors

Best regards
Matthias
Re: No route to host - PLEASE HELP!!!
March 29, 2017 01:44PM
Thank you for helping such a noob so quickly. I thank you more than you know!

I tried to get in with ip and it did not work so I followed the autoflash instructions. It has appeared to work partially because openWRT in back on without piratebox. There is no wifi signal that I can find and there is no piratebox folder on the USB drive. I tried to ssh in and got this error:

ssh root@192.168.1.1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
f0:b4:93:e4:ad:54:f0:2c:48:81:c9:de:54:7a:62:6a.
Please contact your system administrator.
Add correct host key in /home/minty/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/minty/.ssh/known_hosts:1
remove with: ssh-keygen -f "/home/minty/.ssh/known_hosts" -R 192.168.1.1
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.

Any ideas as to what I should do next?
Re: No route to host - PLEASE HELP!!!
March 29, 2017 03:33PM
remove that file

/home/minty/.ssh/known_hosts

on your computer, then you can connect. After a reflesh the SSH key is regenerated.

best regards
Matthias
Re: No route to host - PLEASE HELP!!!
March 29, 2017 05:45PM
Matthias, with you help we are getting closer.

I deleted the file with sudo rm -f filename. I can now ssh in to set the password and time, but only once. There is no piratebox directory on the USB drive and there is no wifi network.

Any ideas on what to do next?
Re: No route to host - PLEASE HELP!!!
March 29, 2017 06:28PM
So, which image did you flash on the router? Was it one from our webpage stable.openwrt.piratebox.de ?
Can you post the output of the commands listed here:

[piratebox.cc]

?
Thanks, best regards Matthias
Re: No route to host - PLEASE HELP!!!
March 29, 2017 06:51PM
I downloaded the install_piratebox.zip file and the openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin file.

I am using the TP-Link model TL-MR3040 for extreme portability.

For the two days it worked before I totally messed it up I really like it. It was like nothing I have ever seen.

OK, the output of those commands is pretty long, but here it is:

root@OpenWrt:~# 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=14592k)
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)
/dev/sda1 on /mnt/usb type vfat (rw,noatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
none on /proc/bus/usb type usbfs (rw,relatime)

root@OpenWrt:~# ls -la /mnt/
drwxr-xr-x 1 root root 0 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
drwxrwxrwx 7 root root 49152 Jan 1 1970 usb

root@OpenWrt:~# ls -la /mnt/usb
drwxrwxrwx 7 root root 49152 Jan 1 1970 .
drwxr-xr-x 1 root root 0 Jan 1 1970 ..
-rwxrwxrwx 1 root root 1151 Mar 28 14:27 PBForum
drwxrwxrwx 6 root root 294912 Jan 1 1980 Shared
drwxrwxrwx 2 root root 16384 Jan 4 2015 System Volume Information
-rwxrwxrwx 1 root root 860 Mar 29 08:41 Untitled Document
drwxrwxrwx 2 root root 16384 Mar 29 08:00 auto_flash
drwxrwxrwx 2 root root 16384 Jan 1 1980 external_fs
drwxrwxrwx 5 root root 16384 Jan 1 1980 install
-rwxrwxrwx 1 root root 85576 Jan 1 1970 install.log

root@OpenWrt:~# ls -la /mnt/usb/PirateBox
ls: /mnt/usb/PirateBox: No such file or directory

root@OpenWrt:~# ls -la /mnt/usb/install
drwxrwxrwx 5 root root 16384 Jan 1 1980 .
drwxrwxrwx 7 root root 49152 Jan 1 1970 ..
-rwxrwxrwx 1 root root 104857600 Oct 5 13:24 OpenWRT.img
-rwxrwxrwx 1 root root 99 Jan 1 1980 auto_package_done
drwxrwxrwx 2 root root 16384 Mar 29 08:01 cache
drwxrwxrwx 2 root root 16384 Mar 29 08:01 image_stuff
drwxrwxrwx 8 root root 16384 Mar 29 08:01 kareha
-rwxrwxrwx 1 root root 3932160 Mar 13 20:10 openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin
-rwxrwxrwx 1 root root 52428800 Mar 19 10:56 piratebox_img

root@OpenWrt:~# ls -la /opt/piratebox
ls: /opt/piratebox: No such file or directory

root@OpenWrt:~# ls -la /opt/piratebox/www
ls: /opt/piratebox/www: No such file or directory

root@OpenWrt:~# cat /etc/pbx_custom_image
PBX_auto_Image_2.3.2

root@OpenWrt:~# cat /etc/openwrt_release
DISTRIB_ID="OpenWrt_backports"
DISTRIB_RELEASE="12.09.2"
DISTRIB_REVISION="r42647"
DISTRIB_CODENAME="attitude_adjustment"
DISTRIB_TARGET="ar71xx/generic"
DISTRIB_DESCRIPTION="OpenWrt_backports Attitude Adjustment 12.09.2"
DISTRIB_BACKPORT="V0.3-MaStr"

root@OpenWrt:~# cat /opt/piratebox/version
cat: can't open '/opt/piratebox/version': No such file or directory

root@OpenWrt:~# cat /opt/piratebox/tmp/error.log
cat: can't open '/opt/piratebox/tmp/error.log': No such file or directory

root@OpenWrt:~# cat /opt/piratebox/tmp/break.log
cat: can't open '/opt/piratebox/tmp/break.log': No such file or directory

root@OpenWrt:~# 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 ipaddr '192.168.1.1'
option netmask '255.255.255.0'

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device radio0
option type mac80211
option channel 11
option hwmode 11ng
option macaddr e8:94:f6:fe:e0:96
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
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 1

config wifi-iface
option device radio0
option network lan
option mode ap
option ssid OpenWrt
option encryption none

root@OpenWrt:~# dmesg | tail -n 20
[ 30.960000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 30.970000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 30.980000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[ 30.980000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[ 30.990000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 31.000000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[ 31.450000] loop: module loaded
[ 31.510000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 31.680000] nf_conntrack version 0.5.0 (455 buckets, 1820 max)
[ 31.970000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 32.240000] batman_adv: B.A.T.M.A.N. advanced 2013.4.0 (compatibility version 14) loaded
[ 36.740000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 36.740000] device eth0 entered promiscuous mode
[ 36.760000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 4276.800000] eth0: link up (100Mbps/Full duplex)
[ 4276.800000] br-lan: port 1(eth0) entered forwarding state
[ 4276.810000] br-lan: port 1(eth0) entered forwarding state
[ 4276.810000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 4276.820000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 4278.810000] br-lan: port 1(eth0) entered forwarding state

root@OpenWrt:~# dmesg | grep sda
[ 10.750000] sd 0:0:0:0: [sda] 62717952 512-byte logical blocks: (32.1 GB/29.9 Gicool smiley
[ 10.760000] sd 0:0:0:0: [sda] Write Protect is off
[ 10.760000] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 10.760000] sd 0:0:0:0: [sda] No Caching mode page present
[ 10.770000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 10.780000] sd 0:0:0:0: [sda] No Caching mode page present
[ 10.780000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 10.790000] sda: sda1
[ 10.800000] sd 0:0:0:0: [sda] No Caching mode page present
[ 10.800000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 10.810000] sd 0:0:0:0: [sda] Attached SCSI removable disk

root@OpenWrt:~# ls /dev/sd*
/dev/sda /dev/sda1

root@OpenWrt:~# ps
PID USER VSZ STAT COMMAND
1 root 1504 S init
2 root 0 SW [kthreadd]
3 root 0 SW [ksoftirqd/0]
4 root 0 SW [kworker/0:0]
5 root 0 SW [kworker/u:0]
6 root 0 SW< [khelper]
7 root 0 SW [kworker/u:1]
63 root 0 SW [sync_supers]
65 root 0 SW [bdi-default]
67 root 0 SW< [kblockd]
96 root 0 SW [kswapd0]
144 root 0 SW [fsnotify_mark]
173 root 0 SW< [ath79-spi]
184 root 0 SW [mtdblock0]
189 root 0 SW [mtdblock1]
194 root 0 SW [mtdblock2]
199 root 0 SW [mtdblock3]
204 root 0 SW [mtdblock4]
209 root 0 SW [mtdblock5]
250 root 0 SW [kworker/0:1]
440 root 0 SWN [jffs2_gcd_mtd3]
470 root 0 SW [khubd]
479 root 0 SW [scsi_eh_0]
480 root 0 SW [usb-storage]
503 root 1504 S init
537 root 0 SW< [cfg80211]
616 root 0 SW< [bat_events]
643 root 1508 S /sbin/syslogd -C16
645 root 1488 S /sbin/klogd
647 root 868 S /sbin/hotplug2 --override --persistent --set-rules-file /etc/hotplug2.rules --set-coldplug-cmd /sbin/udevtrigger --max-children 1
655 root 872 S /sbin/ubusd
716 root 1468 S /sbin/netifd
1152 root 1152 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
1167 root 1496 S /usr/sbin/telnetd -l /bin/login.sh
1280 root 1500 S /sbin/watchdog -t 5 /dev/watchdog
1332 nobody 956 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
1349 root 1492 S syslogd -n -L -R 192.168.1.2:9999
1394 root 1500 S /usr/sbin/ntpd -n -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org
1423 root 1220 S /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
1424 root 1504 S -ash
1456 root 1496 R ps

root@OpenWrt:~# tail -n 20 /mnt/usb/install.log
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : Testing requirements...
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : .. USB storage modules available
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : extendRoot package is installed
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : Trying to find next step
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : executing run_signaling_extendRoot_start
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : Trying to find next step
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : executing run_prepare_extendRoot
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : configure initi step for extendRoot
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : Trying to find next step
Jan 1 00:00:48 OpenWrt user.notice root: /bin/box_installer.sh : executing run_init_extendRoot
Jan 1 00:00:49 OpenWrt user.notice root: /etc/init.d/ext: Mounting external USB storage...
Jan 1 00:00:49 OpenWrt user.notice root: /etc/init.d/ext: Forcing overwrite of /mnt/usb/external_fs/OpenWRT.img if it already exsits
Jan 1 00:00:49 OpenWrt user.notice root: /etc/init.d/ext: Creating ext loop image...
Jan 1 00:00:49 OpenWrt user.notice root: /etc/init.d/ext: No external Image-template file found... loading from Internet
Jan 1 00:00:49 OpenWrt user.notice root: wget: bad address 'downloads.piratebox.de'
Jan 1 00:00:49 OpenWrt user.notice root: /etc/init.d/ext: ERROR: wget failed... cancel
Jan 1 00:00:49 OpenWrt user.notice root: /bin/box_installer.sh : Trying to find next step
Jan 1 00:00:49 OpenWrt user.notice root: /bin/box_installer.sh : executing run_signaling_extendRoot_stop
Jan 1 00:00:49 OpenWrt user.notice root: /bin/box_installer.sh : Trying to find next step
Jan 1 00:00:49 OpenWrt user.notice root: /bin/box_installer.sh : executing exit
Re: No route to host - PLEASE HELP!!!
March 30, 2017 04:48AM
Ok, PirateBox was not installed, only the mount happended.. so it looks like the install folder is wrong

so shutdown the box.
Take the usb stick. Remove the install folder an lay down a new copy of it.
Savely remove the usb stick, put it to your piratebox and power it on.

Then lets see what happens.
Re: No route to host - PLEASE HELP!!!
March 30, 2017 03:01PM
THAT DID IT!!!

PIRATEBOX IS UP AND RUNNING!!!



Matthias,
Thank you! Thank you! Thank you!
I can't thank you enough for your help! If you were here I would buy you a case of beer. Thank you!
Re: No route to host - PLEASE HELP!!!
March 31, 2017 04:24AM
:-) smileys with beer smileys with beer

Congratulations smiling smiley

I am glad it is working now.

Have fun,
best regards Matthias