c3d2-wiki/Server%2Fcider.mw

77 lines
2.1 KiB
Plaintext
Raw Normal View History

2013-10-04 02:06:42 +02:00
== SaferSharing ==
2013-10-04 02:32:48 +02:00
To avoid legal steps because you are hosting to everyone:
2013-10-04 02:06:42 +02:00
* get nginx with auth_base
* proxy around
* modify your fw a bit
==== config nginx ====
2013-10-04 02:53:36 +02:00
as root
2013-10-04 02:06:42 +02:00
2013-10-04 02:55:24 +02:00
<source lang="bash">vi /etc/nginx/sites-available/default</source>
<source lang="bash">cat /etc/nginx/sites-available/default</source>
2013-10-04 02:32:48 +02:00
<pre>
2013-10-04 02:06:42 +02:00
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
auth_basic &quot;Sharing is Caring&quot;;
auth_basic_user_file /etc/nginx/htpasswd;
proxy_pass http://localhost:8000;
proxy_buffering off;
}
}
2013-10-04 02:43:25 +02:00
</pre>
2013-10-04 02:06:42 +02:00
2013-10-04 02:43:25 +02:00
<source lang="bash">vi /etc/nginx/htpasswd</source>
2014-02-21 20:09:56 +01:00
<source lang="bash">cat /etc/nginx/htpasswd</source>
2013-10-04 02:32:48 +02:00
<pre>
2013-10-04 02:43:25 +02:00
user:yoursavepassword
2013-10-04 02:32:48 +02:00
</pre>
2013-10-04 02:43:25 +02:00
In addition we used <source lang="bash">openssl passwd -crypt yoursupersafepassword</source> instead of plaintext password.
2013-10-04 02:06:42 +02:00
==== sharing2 conf ====
2013-10-04 02:53:36 +02:00
as user
2013-10-04 02:43:25 +02:00
<source lang="bash">vi /path/to/sharing2/main.hs</source>
<source lang="bash">cat /path/to/sharing2/main.hs</source>
2013-10-04 02:32:48 +02:00
<pre>
2013-10-04 02:06:42 +02:00
main :: IO ()
main = app &gt;&gt;=
runSettings (defaultSettings
{ settingsHost = HostIPv6
, settingsPort = 8000
, ...
2013-10-04 02:32:48 +02:00
})
</pre>
2013-10-04 02:06:42 +02:00
==== modify iptables ====
2013-10-04 02:53:36 +02:00
as root
2013-10-04 02:43:25 +02:00
<source lang="bash">iptables -t filter -A INPUT ! -s 127.0.0.1 -p tcp --dport 8000 -j DROP</source>
2013-10-04 02:44:21 +02:00
<source lang="bash">ip6tables -t filter -A INPUT ! -s ::1 -p tcp --dport 8000 -j DROP</source>
2013-10-04 02:06:42 +02:00
== Na toll, aber wie ist der Zugang zu Cider nun? ==
wie auf allen anderen Maschinen auch
2013-10-04 02:32:48 +02:00
== MPD ==
2014-02-21 20:19:08 +01:00
[[wikipedia:de:Music Player Daemon|Music Player Daemon]] (MPD) mit ncmpcpp
2014-02-19 00:36:33 +01:00
2014-02-19 00:38:33 +01:00
<source lang="bash">ssh k-ot@cider</source>
2014-02-19 00:36:33 +01:00
* [[w:Music Player Daemon#Clients|ncmpcpp]] ausführen
* Quelle für Musik ist das eingebundene Verzeichnis (SMB) von [[feile]].
2014-02-19 01:28:39 +01:00
2014-02-19 00:38:33 +01:00
<source lang="bash">//feile/space /feile_space cifs credentials=/.feile_space_smbcredentials,uid=1002,gid=1002,iocharset=utf8 0 0</source>
2014-02-19 00:36:33 +01:00
2013-10-04 02:32:48 +02:00
[[Kategorie:Infrastruktur]]