blueblast88
Posts: 3
Joined: Wed Sep 30, 2015 8:13 pm

Wondering how to tackle this

Wed Sep 30, 2015 8:19 pm

My friend and I have been given the task to make a server that needs to be available on the internet to receive either: A string of text, Or a .txt File. However, I need this thing to be secure, fast acting, and very reliable. I was wondering if I should use the Pi as an FTP server or use some sort of HTTP server. Also be aware that it will need to be able to receive data from different users at once. One I get the text to the pi, I know what I need to do. But getting it there securely and reliably becomes the issue. Any help would be appreciated.

Cheers,
Blueblast88

User avatar
DougieLawson
Posts: 36101
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Wondering how to tackle this

Wed Sep 30, 2015 9:20 pm

You can run that in ten lines of python.
https://docs.python.org/3/library/http.server.html

It'll even run out of the box from the command line: python -m http.server --cgi 8000
which is ZERO lines of code.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

HiroProtagonist
Posts: 212
Joined: Sat Jun 29, 2013 9:45 am

Re: Wondering how to tackle this

Wed Sep 30, 2015 9:23 pm

Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"

blueblast88
Posts: 3
Joined: Wed Sep 30, 2015 8:13 pm

Re: Wondering how to tackle this

Thu Oct 01, 2015 9:58 pm

DougieLawson wrote:You can run that in ten lines of python.
https://docs.python.org/3/library/http.server.html

It'll even run out of the box from the command line: python -m http.server --cgi 8000
which is ZERO lines of code.
Thanks! I am not home to try this right now however I will let you know how it goes! Also: How secure is this? and how can I make it as secure as possible?
Last edited by blueblast88 on Thu Oct 01, 2015 10:01 pm, edited 1 time in total.

blueblast88
Posts: 3
Joined: Wed Sep 30, 2015 8:13 pm

Re: Wondering how to tackle this

Thu Oct 01, 2015 9:59 pm

HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Wondering how to tackle this

Thu Oct 01, 2015 10:05 pm

blueblast88 wrote:
HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.
How is ssh not secure enough? You can fiddle around with the encryption if you want.

What's the need for such security?
There are 10 types of people: those who understand binary and those who don't.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Wondering how to tackle this

Fri Oct 02, 2015 12:14 am

blueblast88 wrote:
HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.
You need smarter friends.

If you are doing it through a browser you need https.

Return to “Networking and servers”