rasppi as piratebox + modify usb content remotely

Posted by zoras 
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
rasppi as piratebox + modify usb content remotely
May 21, 2014 06:31PM
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! smiling smiley
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! winking smiley
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.



Edited 1 time(s). Last edit at 05/21/2014 06:47PM by zoras.
Re: rasppi as piratebox + modify usb content remotely
May 21, 2014 08:31PM
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: rasppi as piratebox + modify usb content remotely
May 23, 2014 05:46PM
Ehi Matthias,
really thank you for all the greatful explanation.
I have a few other doubts and i will take advantage of your kindness winking smiley
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
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 grinning smiley
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!



Edited 1 time(s). Last edit at 05/23/2014 06:48PM by zoras.
Re: rasppi as piratebox + modify usb content remotely
May 26, 2014 08:33PM
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