Hallo ich hab hier einen alten RPI-1 B rumliegen den ich als Downloadserver nutzen will, ich benutzte dabei OSMC (ehemals RASPBMC) als Basis, da dieses recht abgespeckt daherkommt wenn man den Mediacenter(Kodi) entfernt oder zumindest gekillt hat.
Nun möchte ich das ganze von "außerhalb" erreichbar machen, aber auch sichergehen das das soweit "sicher" geht.
Theoretisch könnte man das ganze per SSH machen, wenn der Pyload-CLI funktionieren würde, allerdings kann ich hier im Test die "hinzugefügten" Links nicht per "END"-Taste hinzufügen, daher muss es dann wohl doch das Webinterface sein.
Pyload-CLI funktioniert, man muss "END" eintippen, nicht die "Taste END" drücken –> FAIL.
Erstmal ein wenig Output was so im "normalen" Betrieb bei OSMC am laufen ist, und was gegebenfalls verändert werden sollte:
PSTREE:
osmc@osmc:~$ sudo pstree -a systemd ├─avahi-daemon │ └─avahi-daemon ├─connmand -n --nodnsproxy --config=/etc/connman.conf ├─dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation ├─eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --repeat-filter --release=_UP -f ├─lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd-lirc0 --pidfile=/var/run/lirc/lircd-lirc0.pid /etc/lirc/lircd.conf ├─nmbd -D ├─ntpd -p /var/run/ntpd.pid -g -u 106:110 ├─polkitd --no-debug │ ├─{gdbus} │ └─{gmain} ├─rpcbind -w ├─screen python pyLoadCore.py │ └─python pyLoadCore.py │ └─21*[{python}] ├─smbd -D ├─sshd -D │ └─sshd │ └─sshd │ └─bash │ └─sudo pstree -a │ └─pstree -a ├─systemd --user │ └─(sd-pam) ├─systemd-journal ├─systemd-logind ├─systemd-udevd ├─udisks-daemon --no-debug │ ├─udisks-daemon │ └─{gdbus} ├─udisks-glue --foreground ├─uptimed -f └─wpa_supplicant -u -s -O /run/wpa_supplicant
NETSTAT:
osmc@osmc:~$ sudo netstat -taulpen Aktive Internetverbindungen (Server und stehende Verbindungen) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:7227 0.0.0.0:* LISTEN 1000 10599 489/python tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 0 8979 358/smbd tcp 0 0 192.168.1.18:8000 0.0.0.0:* LISTEN 1000 10601 489/python tcp 0 0 0.0.0.0:9666 0.0.0.0:* LISTEN 1000 10624 489/python tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 0 8980 358/smbd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 7219 250/rpcbind tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 6450 188/sshd tcp 1 0 192.168.1.18:34686 104.28.5.120:80 CLOSE_WAIT 1000 10623 489/python tcp 0 248 192.168.1.18:22 192.168.1.13:59266 VERBUNDEN 0 9233 432/sshd: osmc [pri tcp6 0 0 :::445 :::* LISTEN 0 8977 358/smbd tcp6 0 0 :::139 :::* LISTEN 0 8978 358/smbd tcp6 0 0 :::111 :::* LISTEN 0 7222 250/rpcbind tcp6 0 0 :::22 :::* LISTEN 0 6458 188/sshd udp 0 0 0.0.0.0:53497 0.0.0.0:* 105 5838 161/avahi-daemon: r udp 0 0 0.0.0.0:849 0.0.0.0:* 0 7218 250/rpcbind udp 0 0 0.0.0.0:111 0.0.0.0:* 0 7213 250/rpcbind udp 0 0 192.168.1.18:123 0.0.0.0:* 0 8757 316/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 0 8756 316/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 0 8747 316/ntpd udp 0 0 192.168.1.255:137 0.0.0.0:* 0 8819 330/nmbd udp 0 0 192.168.1.18:137 0.0.0.0:* 0 8818 330/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 0 8807 330/nmbd udp 0 0 192.168.1.255:138 0.0.0.0:* 0 8821 330/nmbd udp 0 0 192.168.1.18:138 0.0.0.0:* 0 8820 330/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 0 8808 330/nmbd udp 0 0 192.168.1.18:58293 192.168.1.1:53 VERBUNDEN 0 8489 171/connmand udp 0 0 0.0.0.0:5353 0.0.0.0:* 105 5836 161/avahi-daemon: r udp6 0 0 :::40485 :::* 105 5839 161/avahi-daemon: r udp6 0 0 :::849 :::* 0 7221 250/rpcbind udp6 0 0 :::111 :::* 0 7220 250/rpcbind udp6 0 0 ::1:123 :::* 0 8758 316/ntpd udp6 0 0 :::123 :::* 0 8748 316/ntpd udp6 0 0 :::5353 :::* 105 5837 161/avahi-daemon: r osmc@osmc:~$
NMAP:
osmc@osmc:~$ sudo nmap localhost Starting Nmap 6.47 ( http://nmap.org ) at 2015-10-04 20:37 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.00027s latency). Other addresses for localhost (not scanned): 127.0.0.1 Not shown: 995 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind 139/tcp open netbios-ssn 445/tcp open microsoft-ds 9666/tcp open unknown Nmap done: 1 IP address (1 host up) scanned in 26.12 seconds
TO-DO-LISTE
1) Port-Forwarding (ausschließlich Pyload&SSH):
Lokale IP des Raspberry-Pi (192.168.1.18)
Zu öffnende Ports: 22
& 443 (Pyload-SSL, Port 80 nicht notwendig???)
2) DDNS Service & Client
Ich dachte da an:
ddclient
afraid.org DNS-Service
3) SSH&Pyload-Proofening
1. Pyload-SSL-Zertifikat erstellen
SSH: von PasswordAuth zu PublikkeyAuth? Auch interessiert mich die Yubikey-Geschichte, geht da was?
Bei den Einstellungen am Router kann ich zwischen LAN-Port & Öffentlichen-Port unterscheiden, wäre es da sinnvoll Port:22(LAN) auf einen anderen Port (Öff. Port) umzuleiten?
Vielen Dank!