DietPi as a Classroom Webserver WITHOUT Internetconnection

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
schoolie
Posts: 4
Joined: Tue Dec 05, 2017 6:29 pm

DietPi as a Classroom Webserver WITHOUT Internetconnection

Post by schoolie »

Hello!
I am a teatcher in Germany and want to use a RaspberryPi with DietPi as a Webserver in class to deplay a learning environment I plan to establish. It should not need ANY internet connection while in class. The server should redirect any www.xxx.xxx calls to "localhost" i.e. a standard homepage (index.html). Somehow like a honeypot. How could I get this done. I have allready installed a working hotspot on dietpi (via dietpi-software). The Pi should be ssh-able via ethernet-connetction at home .

Any help is ... let's put it simple ... I do not have any idea what to do or how to get this to work.

Thanx a lot for any help, regards Stefan
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by WarHawk »

Just stumbled across this...did several searches

Internet-in-a-Box
and
schoolserver.org
It appears with this app and an external 1TB or larger (or if you need to host smaller purpose driven training say a 64GB USB drive), it downloads the content to the static drive...then anyone connecting to that device can access that content as if they were on the internet

download for rpi
http://download.iiab.io/6.4/rpi/

https://youtu.be/KAADBRZVncs <-short intro
https://www.youtube.com/watch?v=pR2mL0HVUGU <-full hour

I have an old screen busted laptop...I might slap ubuntu on it...and see what it can do...at least see if I can get single use content (such as a classroom single subject content [like you are asking for]) rather than seeing if it has to have HUGE repository of data on it

It appears you can #add-content, so maybe a minimal install with NOTHING (no open source repositories) on it...then add the users content...instead of "internet-in-a-box" make it a "classroom-in-a-box" so its MUCH more customizable and expandable (individual use basis)...
http://wiki.laptop.org/go/IIAB/FAQ#Can_ ... content.3F
schoolie
Posts: 4
Joined: Tue Dec 05, 2017 6:29 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by schoolie »

thanx for the fast answer! I know schoolserver.org BUT I basically only want to run a webserver with wordpress and runestone.
the features of schoolserver.org are far beyond my needs.
any idea i could achieve this with dietpi?
schnitzelbrain
Posts: 13
Joined: Sun Nov 05, 2017 4:23 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by schnitzelbrain »

schoolie wrote:Hello!
I am a teatcher in Germany and want to use a RaspberryPi with DietPi as a Webserver in class to deplay a learning environment I plan to establish. It should not need ANY internet connection while in class. The server should redirect any http://www.xxx.xxx calls to "localhost" i.e. a standard homepage (index.html). Somehow like a honeypot. How could I get this done. I have allready installed a working hotspot on dietpi (via dietpi-software). The Pi should be ssh-able via ethernet-connetction at home .

Any help is ... let's put it simple ... I do not have any idea what to do or how to get this to work.

Thanx a lot for any help, regards Stefan
I did not test this but you could try (make a backup first of your DietPi, just in case :D )

Code: Select all

apt-get install iptables
iptables -t nat -A PREROUTING -d 0/0 -p tcp –dport 80 -j DNAT –to 10.0.0.1:80
So every port 80 request is routed to 10.0.0.1:80 (change this IP to your localhost address).
Bei iptables

Code: Select all

-A is insert at end of rules
-I is insert at beginning of rules
-D delete this entry
so for your example

Code: Select all

iptables -t nat -D PREROUTING -d 0/0 -p tcp –dport 80 -j DNAT –to 10.0.0.1:80
should delete this again.

You can check the web for more details on IP tables.
As I said, all untested by me.

regards
Schnitzelbrain
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by k-plan »

Hi Stefan,
schoolie wrote:I have allready installed a working hotspot on dietpi (via dietpi-software).
Sollen die Clients alle via WLAN verbunden sein?

Der schnitzelbrain Ansatz hat was und könnte was werden. Schön simpel.

SSH via WLAN wird aber ein Problem. Ist aber lösbar.


Anderer Ansatz, ohne ihn jetzt komplett durchdacht oder getestet zu haben, wäre den via DHCP verteilten DNS der Clients umzubiegen.

Mit GUI, der fällt mir pi-hole ein.

Eine entsprechend blacklist mit wildcard und pi-hole biegt die Anfrage dann auf eine Custom block page um.
Von dort aus kannst du dann weiter verzweigen. Diese Seiten gehören dann in die pi-hole whitelist.

cu
k-plan
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
schoolie
Posts: 4
Joined: Tue Dec 05, 2017 6:29 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by schoolie »

Hallo zusammen,
vielen Dank für die Antworten. Ich versuch es nochmal in Deutsch zu beschreiben ...
Ich möchte den Pi als Webserver betreiben, um an mit ihm über WLAN verbundenen Clients HTML Seiten zur Verfügung zu stellen.
Ich habe KEIN Ethernet und WLAN in den Klassenräumen zur Verfügung.
Zuhause möchte ich den Pi an mein Netzwert via LAN anbinden, um z. B. Softwareupdates machen und weiter Software installieren zu können.
Ich kann daher nicht alle TCP Anfragen umbiegen - war von mir unklar formuliert (Englisch eben), sorry.
LG, Stefan
schoolie
Posts: 4
Joined: Tue Dec 05, 2017 6:29 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by schoolie »

Ich bin gerade darüber gestolpert, könnte genau das sein was ich suche.
Könnte mir jemand die Installation an DietPi oder Raspbian Stretch anpassen?

https://villagescience.org/installation/

LG, Stefan
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by k-plan »

Hi Stefan,

Ja, hatte mir schon vorstellen können, was du erreichen möchtest.
schnitzelbrain Ansatz biegt nur die Anfragen auf der WLAN/WiFi Schnittstelle um.
Daher halte ich ihn auf für verfolgenswert und umsetzbar.
iptables bringt der WiFi-Hotspot schon mit:
https://github.com/Fourdee/DietPi/blob/ ... 907-L10968


Habe da nur einmal kurz reingeschaut:

https://github.com/villagescience/vspi/ ... r/setup.sh
schoolie wrote:oder Raspbian Stretch anpassen?
An Stretch eher nicht. Die verwenden noch mysql und die ganze Sache ist von 6 May 2014.

Hardware:
Raspberry Pi Model B und einen speziellen WiFi USB Dongle Edimax EW-7811Un
Deren Netzwerkonfiguration ist auch ziemlich auf den USB Wifi Stick mit Wheezy oder Jessie zugeschnitten.

Schau dir mal das Installationsscript an. Da ist nicht viel Magie drin. Das meiste kann man auch über dietpi-software installieren und du wärest Hardware unabhängiger.
Der Rest kann man sicher den Script entnehmen, wenn das für dich die tauglich Lösung ist.

Sorry, tut mir leid, aber im Moment benötigt das DietPi Projekt so viel Aufmerksamkeit und Zeit, das kaum Zeit für andere Dinge bleibt.

Aber vielleicht kann ein anderer User hier dir aushelfen.

cu
k-plan.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: DietPi as a Classroom Webserver WITHOUT Internetconnecti

Post by WarHawk »

Saw this...remembered this thread

https://www.raspberrypi.org/blog/piserver/
Post Reply