Quantcast
Channel: PirateBox Forum - Raspberry Pi(rate)Box
Viewing all 1863 articles
Browse latest View live

Re: Fix for Alfa external WiFi antenna? Alternative: TR-702N mini router (?)

$
0
0
Personally, I think the only point was the network-configuration, which is shipped on wifi only.
PirateBox runs well on RPi, if this hard point is done.

my 2 cents about that :)

I'm glad, you got the MR3020 working :)

Need Internet connection on Raspberry pi with Piratebox running Simultaneously

$
0
0
Hi,
I have configured the piratebox on Raspberry Pi and using it by the Wifi adapter,
but I need internet connection to raspberry pi through Ethernet port and also simultaneously don't want to disturb Piratebox Configuration. so please tell me the essential network configuration to achieve it similar to this thread on TPLINK MR 3020 on Openwrt [forum.daviddarts.com]

my /etc/network/interfaces file looks like
auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0
iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

and my ifconfig output is
eth0      Link encap:Ethernet  HWaddr b8:27:eb:75:94:94  
          inet addr:192.168.9.123  Bcast:192.168.9.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26018 errors:0 dropped:0 overruns:0 frame:0
          TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1490865 (1.4 MiB)  TX bytes:13093 (12.7 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:49 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5368 (5.2 KiB)  TX bytes:5368 (5.2 KiB)

mon.wlan0 Link encap:UNSPEC  HWaddr E8-4E-06-14-9E-01-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4236 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:1405407 (1.3 MiB)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr e8:4e:06:14:9e:01  
          inet addr:192.168.77.1  Bcast:192.168.77.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1602 errors:0 dropped:36 overruns:0 frame:0
          TX packets:1252 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:202095 (197.3 KiB)  TX bytes:343586 (335.5 KiB)

please tell me detail how to to run Wan on Raspberry Pi without disturbing Piratebox.

Thanks in Advance

Re: Need Internet connection on Raspberry pi with Piratebox running Simultaneously

$
0
0
Hi,
that looks like I would say, it does work like that.

It doesn't ?

regards Matthias

Re: Need Internet connection on Raspberry pi with Piratebox running Simultaneously

[Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
Hi,
I am enjoying the Piratebox on the Raspberry Pi, :)
but stuck on how to configure the Piratebox Shared folder to USB. :(
I have tried it by adding links but it didnt work I hope there may be the Permissions issue
I want the following directory to link with my Shared Directory in Usb
pi@raspberrypi ~ $ ls -lh  /opt/piratebox/share/Shared/
total 124K
-rw------- 1 nobody nogroup 120K May 12 09:44 07.png
drwxrwxrwx 3 root   root    4.0K May 12 09:24 Apps

My Shared directory on the usb is
pi@raspberrypi ~ $ ls -lh /media/usb0/
total 16K
drwxr-xr-x 2 root root 16K May 12 10:44 Shared

I need to make this Shared directory as default for Droopy server's file uploading and also the folder for default file storage.
please tell me the changes in /opt/piratebox/piratebox.conf and the user permissions and directory permissions.

thanks in advance

Re: [Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
Hi,
which filesystem is you USB Stick?
How does the USB stick get mounted?
Where did you configure what?

if you run
/opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf part2
that should initialize the folders to the correct permissions.

can you additional post the output of the following commands, please

mount
ls -l /opt/piratebox/
ls -l /opt/piratebox/share
ls -l /opt/piratebox/www

grep DROOPY /opt/piratebox/conf/piratebox.conf
grep FOLDER /opt/piratebox/conf/piratebox.conf
grep LIGHTTPD /opt/piratebox/conf/piratebox.conf

Thanks in advance
Matthias

Re: [Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
Hi
File System of My USB Stick is FAT32
My USB stick is automunted by the tool usbmount I installed it by the following command and now my USB is automounted to /media/usb0
sudo apt-get install usbmount

My Piratebox is Configured at /opt/piratebox and my contents are at /opt/piratebox/share/Shared/
I need to change the Shared folder to USB so initially I tried to symlink with the following command
sudo ln -s /opt/piratebox/share/Shared /media/usb0/Shared
but still I am not getting the expected result and my droopy server fails for file uploading.
then I tried with changing the Share folder path in /opt/piraterbox/conf/piratebox.xonf
SHARE_FOLDER="$PIRATEBOX_FOLDER/share
changed it to
SHARE_FOLDER="/media/usb0/share/Shared"
still I was not able to achieve the expected result and droopy file uploading failed

------------------------------------
output of commands
pi@raspberrypi ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=215824k,nr_inodes=53956,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44820k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /media/usb0 type vfat (rw,nodev,noexec,noatime,nodiratime,sync,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89620k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p5 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

pi@raspberrypi ~ $ ls -l /opt/piratebox/
total 36
drwxr-xr-x 3 root   root    4096 May 12 07:18 bin
drwxr-xr-x 3 root   root    4096 May 12 07:19 conf
drwxr-xr-x 2 root   root    4096 May 12 07:18 init.d
drwxr-xr-x 2 root   root    4096 May 12 07:20 python_lib
drwxr-xr-x 5 nobody nogroup 4096 May 12 07:19 share
drwxr-xr-x 2 root   root    4096 May 12 07:18 src
drwxr-xr-x 2 nobody nogroup 4096 May 12 13:17 tmp
-rw-r--r-- 1 root   root      18 May 12 07:18 version
drwxr-xr-x 4 nobody nogroup 4096 May 12 09:10 www

pi@raspberrypi ~ $ ls -l /opt/piratebox/share
total 20
drwxr-xr-x 2 nobody nogroup 4096 May 12 07:19 board
-rwxr-xr-x 1 root   root    4318 May 12 07:19 index.html
drwxrwxrwx 5 nobody nogroup 4096 May 12 11:10 Shared
drwxr-xr-x 2 nobody nogroup 4096 May 12 07:19 tmp

pi@raspberrypi ~ $ ls -l /opt/piratebox/www
total 208
-rw-r--r-- 1 root   root     1236 May 12 09:07 AppAddaIcon.png
-rw-r--r-- 1 root   root    23186 May 12 09:08 Appadda.png
lrwxrwxrwx 1 root   root       26 May 12 07:19 board -> /opt/piratebox/share/board
drwxr-xr-x 2 nobody nogroup  4096 May 12 07:19 cgi-bin
-rw-r--r-- 1 nobody nogroup   637 May 12 13:17 chat_content.html
-rwxr-xr-x 1 nobody nogroup  1518 May 12 07:18 chat.html
-rwxr-xr-x 1 root   root        0 May 12 09:10 CheckCoupon.html
-rwxr-xr-x 1 nobody nogroup  1406 May 12 07:18 favicon.ico
-rwxr-xr-x 1 nobody nogroup   172 May 12 07:18 forum.html
-rw-r--r-- 1 root   root     4886 May 12 09:07 index.html
-rw-r--r-- 1 nobody nogroup 94840 May 12 07:18 jquery.min.js
drwxr-xr-x 3 nobody nogroup  4096 May 12 07:18 library
-rw-r--r-- 1 nobody nogroup    15 May 12 07:18 ncsi.txt
-rwxr-xr-x 1 nobody nogroup 16453 May 12 07:18 piratebox-logo.png
-rwxr-xr-x 1 nobody nogroup 12637 May 12 07:18 piratebox-logo-small.png
-rwxr-xr-x 1 nobody nogroup   200 May 12 09:25 redirect.html
lrwxrwxrwx 1 root   root       27 May 12 07:19 Shared -> /opt/piratebox/share/Shared
-rw-r--r-- 1 root   root      122 May 12 13:38 station_cnt.txt
-rwxr-xr-x 1 nobody nogroup   298 May 12 07:18 style.css


pi@raspberrypi ~ $ grep DROOPY /opt/piratebox/conf/piratebox.conf
DROOPY_ENABLED="yes"
DROOPY_TXT=""
DROOPY_PORT="8080"
DROOPY_USERDIR=""
#DROOPY_USERDIR=" -u True "
DROOPY_USE_USER="yes"

pi@raspberrypi ~ $ grep FOLDER /opt/piratebox/conf/piratebox.conf
PIRATEBOX_FOLDER="/opt/piratebox"
WWW_FOLDER="/opt/piratebox/www"
PIRATEBOX_PYTHONPATH="$PIRATEBOX_FOLDER/python_lib"
#SHARE_FOLDER="/media/usb0/share/Shared"
SHARE_FOLDER="$PIRATEBOX_FOLDER/share"
# UPLOADFOLDER="$SHARE_FOLDER/Upload"
UPLOADFOLDER="$SHARE_FOLDER/Shared"
 . $PIRATEBOX_FOLDER/conf/ipv6.conf
IMAGE="$PIRATEBOX_FOLDER/src/$IMAGENAME"
CHATFILE="$WWW_FOLDER/cgi-bin/data.pso"
GEN_CHATFILE="$WWW_FOLDER/chat_content.html"
.  $PIRATEBOX_FOLDER/conf/hook_custom.conf

pi@raspberrypi ~ $ grep LIGHTTPD /opt/piratebox/conf/piratebox.conf
LIGHTTPD_USER=nobody
LIGHTTPD_GROUP=nogroup

Thanks for quick response, and I hope some trick will work for me.

Re: [Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
Hi,
I Solved the Shared folder issue by simply adding the symlink as
sudo ln -s /media/usb0/Shared/ /opt/piratebox/www/Shared

but I am not able to change the droopy Upload folder to
/media/usb0/Shared/Upload

Re: [Urgent]How to change PirateBox Shared Folder to USB by default

$
0
0
hi,
you can edit /opt/piratebox/conf/piratebox.conf and change the line

 UPLOADFOLDER="$SHARE_FOLDER/Shared"

exchange it with the absolute path.
after changing you need to restart the PirateBox I.e

/etc/init.d/piratebox restart

regards Matthias

USB storage, again.

$
0
0
Hi all!

I've just put together a Piratebox and I was wondering how to use a external USB flash drive as the upload destination?

I've read a few threads here, and I couldn't get the solutions in them to work. (Most likely user error on my side!)

My SD card is only 4gb, which won't be enough, and I have a 32gb USB pen drive I'd like to use.

I've tried to do a symlink, and change the upload folder in piratebox.conf. The symlink does nothing, and the changed config causes uploads to fail.

Many thanks for reading, and even more so if you can help!

Re: USB storage, again.

$
0
0
Hi,
how is your usb stick formatted?
How is it configured to be mounted correctly?
can you please provide the output of

mount
mount | grep sd | awk '{print $3;}'  | xargs -I []   ls -l []
ls -l /opt/piratebox
ls -l /opt/piratebox/share
ls -l /opt/piratebox/www

regards Matthias

Re: USB storage, again.

$
0
0
Hi Matthias! Thanks for the speedy reply!

The USB stick is formatted as fat32.

It seems to automatically mount in /media/USBNAME. I can read and write files to it. USBNAME being the name of the drive.

Here's the output of those commands in order.
pi@raspberrypi ~ $ mount
/dev/root on / type ext4 (rw,noatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=216132k,nr_inodes=54033,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=44880k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=89740k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)
The 2nd one does nothing.
pi@raspberrypi ~ $ ls -l /opt/piratebox
total 36
drwxr-xr-x 3 root   root    4096 Feb  9 11:09 bin
drwxr-xr-x 3 root   root    4096 Feb  9 06:39 conf
drwxr-xr-x 2 root   root    4096 Jun  7  2013 init.d
drwxr-xr-x 2 root   root    4096 Feb  9 03:43 python_lib
drwxr-xr-x 5 nobody nogroup 4096 Feb  9 03:43 share
drwxr-xr-x 2 root   root    4096 Jun  7  2013 src
drwxr-xr-x 2 nobody nogroup 4096 Feb  9 12:30 tmp
-rw-r--r-- 1 root   root      18 Jun  7  2013 version
drwxr-xr-x 4 nobody nogroup 4096 Feb  9 05:52 www
pi@raspberrypi ~ $ ls -l /opt/piratebox/share
total 20
drwxr-xr-x 2 nobody nogroup 4096 Feb  9 03:43 board
-rwxr-xr-x 1 root   root    4318 Feb  9 03:43 index.html
drwxr-xr-x 2 nobody nogroup 4096 Feb  9 12:20 Shared
drwxr-xr-x 2 nobody nogroup 4096 Feb  9 03:43 tmp
pi@raspberrypi ~ $ ls -l /opt/piratebox/www
total 180
lrwxrwxrwx 1 root   root       26 Feb  9 03:43 board -> /opt/piratebox/share/board
drwxr-xr-x 2 nobody nogroup  4096 Jun  7  2013 cgi-bin
-rw-r--r-- 1 nobody nogroup   637 Feb  9 12:30 chat_content.html
-rwxr-xr-x 1 nobody nogroup  1518 Jun  7  2013 chat.html
-rwxr-xr-x 1 nobody nogroup  1406 Jun  7  2013 favicon.ico
-rw-r--r-- 1 nobody nogroup     0 Feb  9 03:43 forban_link.html
-rwxr-xr-x 1 nobody nogroup   172 Jun  7  2013 forum.html
-rwxr-xr-x 1 nobody nogroup  4323 Feb  9 05:33 index.html
-rw-r--r-- 1 nobody nogroup 94840 Jun  7  2013 jquery.min.js
drwxr-xr-x 3 nobody nogroup  4096 Jun  7  2013 library
-rw-r--r-- 1 nobody nogroup    15 Jun  7  2013 ncsi.txt
-rwxr-xr-x 1 nobody nogroup 16453 Jun  7  2013 piratebox-logo.png
-rwxr-xr-x 1 nobody nogroup 12637 Jun  7  2013 piratebox-logo-small.png
-rwxr-xr-x 1 nobody nogroup   201 Jun  7  2013 redirect.html
lrwxrwxrwx 1 root   root       16 Feb  9 05:52 shared -> /media/PIRATEBOX
lrwxrwxrwx 1 root   root       27 Feb  9 03:43 Shared -> /opt/piratebox/share/Shared
-rw-r--r-- 1 nobody nogroup   122 Feb  9 12:32 station_cnt.txt
-rwxr-xr-x 1 nobody nogroup   298 Jun  7  2013 style.css



Most of the issues I've had I have been able to fix, but there's one that I cant get going, and that is the Connected clients counter. I've made it appear, and report how many connected users, but after 2 minutes since boot, it goes back to 0. I have to manually run
sudo /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf station_cnt
Every time I want it to update once.

Thanks for taking the time to help!

Clym5.

Re: USB storage, again.

$
0
0
Did you grab the output, while the usb stick was connected?

You made some mistakes while linking.

You should do the following commands now, assuming, that the USB-Stick is named "PIRATEBOX", like you created the link.

rm  /opt/piratebox/www/shared    #remove the false link
mkdir /media/PIRATEBOX/PirateBox
mv -v /opt/piratebox/share  /media/PIRATEBOX/PirateBox/ 
ln -s /media/PIRATEBOX/PirateBox/share  /opt/piratebox/share

If the nobody user is able to read-write to the usb-Stick, that should do the trick.

About the station_cnt script: did you enable your cron service on the RPi? That one is responsible for creating the station_cnt file

Hope that helps
regards Matthias

Re: USB storage, again.

$
0
0
Well, aren't I silly! I didn't have the USB stick connected... I also lost it. I'll try find it when I can! Bah..

I'll run those commands as soon as I can! Thanks!


I'm pretty sure the cron service is running, I can see it listed in the output of "top". The station_cnt file reports how ever many people are connected, but then goes to 0 after 2 min. I'd think that it must be running if it resets to 0 when it should update, instead of just staying as the number of the first check. Just a thought.

Thanks again!

Clym5.

Re: USB storage, again.

$
0
0
For which user did you setup the crontask ?
How did you run the "crontab" command ?

Maybe it is a permission problem.

rasppi as piratebox + modify usb content remotely

$
0
0
Hello everyone,
first of all really thank you and compliments to you for the great great job done here! The piratebox is an amazing thing! :)
Now the question: just as an introduction, i've to say that i'm pretty noob in firmware development and raspberry too...but i wanna learn! ;)
I want to start a new project where i will need the raspberry working like a piratebox (with the wifi dongle, as i read in the forum, it should be possible) but, simultaneously, connected trough an ethernet wire to a router, to have internet connection (also this, read in the forum, it should be possible) and connected to a usb storage to take the files from; now: is it possible to remotely connect to the router and change the usb content? i mean: is it possible for me, from my home, change the content of the usb pen connected to the raspberry directly from the web and through the router? Do i need to modify the router firmware? Do i need to modify the piratebox code? Or is it sufficient to use the code posted here (forum link) and use the upload capability already present in piratebox?
Thank you so much in advance and sorry if i have been so lenghty!

Marco.

Re: rasppi as piratebox + modify usb content remotely

$
0
0
Hi Marco,
yes, you can achieve something like that.

No, you don't need to create special firmware or SD card images. On RPi you can freely install software later on.

You may consider using SFTP to change the files on the RPi via ethernet (same user&password then ssh) - on windows you can use "WINSCP" for that.

The ethernet configuration is per default set to separated networks (ethernet + wifi).

regards Matthias

Re: USB storage, again.

$
0
0
Eheheheh.. I don't recall running those commands at all!

I'm away from my box for a few days, so I wont be able to try anything for a bit.

I'll definitely post back when I can though!

Thanks for taking the time to help so far!

Re: rasppi as piratebox + modify usb content remotely

$
0
0
Ehi Matthias,
really thank you for all the greatful explanation.
I have a few other doubts and i will take advantage of your kindness ;)
when you say "On RPi you can freely install software later on", you mean that i can install the piratebox image and then other software on it? like i can have a desktop as in the normal raspberry (without piratebox)? sorry i've told you that i'm a little bit noob :P
on the other hand...if i try to use software like "winscp" to use the sftp protocol, i think that i will need to point some ip...(i'm thinking about the situation when i'm in my home and i'm not in the same network) Now: how can i connect to the router and then gain the access to the raspi...do i have to point the router public ip? if yes, how can i reach the raspi then? how can i know the "ethernet ip" of the raspi that router has given to it?
i don't know if my question is clear, i can see that it's really a mess :D
thank you again, good night,

Marco.


edit: another rapid question: if i use the raspi with the wifi dongle, are there any limitations on the numbers of possible clients that can connect to the dongle? or is it the same as the normal case with a router (i think 254)? thanks!

Re: rasppi as piratebox + modify usb content remotely

$
0
0
Hi Marco,

Quote

when you say "On RPi you can freely install software later on", you mean that i can install the piratebox image and then other software on it? like i can have a desktop as in the normal raspberry (without piratebox)? sorry i've told you that i'm a little bit noob tongue sticking out smiley
Yes you can. You "only" have to install it. If you use the latest raspian image, you can install the PirateBox on it... and the latest Raspian image is shipped with a running Desktop-service.

Quote

on the other hand...if i try to use software like "winscp" to use the sftp protocol, i think that i will need to point some ip...(i'm thinking about the situation when i'm in my home and i'm not in the same network) Now: how can i connect to the router and then gain the access to the raspi...do i have to point the router public ip? if yes,
Yes, you would connect to the public IP. In this case you use a dynamic dns, you already mentioned in your opening post above. I totally can recommend running the service on afraid.org

Quote

f yes, how can i reach the raspi then? how can i know the "ethernet ip" of the raspi that router has given to it?
If you run a server behind a nat-based-router (what you have), you usually do three steps

1. Setup within the router's config that your RPi gets a static IP based upon his ethernet mac address. On the most devices you can lookup the current running systems connected to the router with the MAC+IP combination. (If you are lucky you can even see the hostname).
2. Go to the "Port Forwarding" configuration of your router and forward the following ports to the static IP you gave the RPi at step 1
  80/TCP   = web
  22/TCP   = SSH
  21/TCP   =  FTP
3. Restart your RPi, that it changes the network configuration to the new IP


About simultaneous sessions? No idea, depends on the traffic and the USB-Wifi dongle, I guess

regards Matthias
Viewing all 1863 articles
Browse latest View live