Idiocy | Never Underestimate the Power of Stupid People in Large Groups

autorun.sh QNAP NAS (Gedankenstütze)

Wie kommt man eigentlich an die autorun.sh …

mount -t ext2 /dev/mtdblock5 /tmp/config
vi /tmp/config/autorun.sh
cd /
umount /tmp/config

Bei Bedarf: chmod +x /tmp/config/autorun.sh


Back to Top | No Comments

Syslog Server auf QNAP NAS

Damit mein schöner neuer Access Point und die Firewall ihre Logfiles irgendwo hinschreiben können, brauchte ich im lokalen Netz einen Syslog Server. Die Wahl fiel auf das QNAP. Und so geht’s…

1.) ipkg update
2.) ipkg upgrade (nur damit auch die neuesten Pakete installiert sind)
3.) ipkg install syslog-ng

Da ich nicht das “normale” Logging des QNAPs überschreiben wollte, habe ich den syslog-ng nur auf UDP:514 hören lassen. Hier die /opt/etc/syslog-ng/syslog-ng.conf

options { long_hostnames(off); sync(0); };
source net { udp(); };
destination wap { file(“/share/MD0_DATA/tftpboot/logfiles/wap.txt”); };
destination fw { file(“/share/MD0_DATA/tftpboot/logfiles/firewall.txt”); };
filter f_wap { facility(local7); };
filter f_fw { facility(local6); };
log { source(net); filter(f_wap); destination(wap); };
log { source(net); filter(f_fw); destination(fw); };

Den Speicherort der Dateien könnt ihr selbst bestimmen. Der Wireless Access Point (wap) loggt mit Local7, die Firewall mit LOCAL6.

Danach noch die /opt/etc/init.d/S01syslog-ng in der autorun.sh starten und alles wird gut ;)


Back to Top | No Comments

sehr geil!

sorry, aber anders kann man das nicht mehr beschreiben … schaut euch einfach mal den channel von fretkillr auf youtube an!


Back to Top | No Comments

GNTM

Bei der letzten Folge sehr mitgeleidet!


Back to Top | No Comments

Eigener TFTP-Server auf QNAP NAS

1. ipkg install tftpd-hpa
2. edit /opt/etc/init.d/S11tftpd:

#! /bin/sh

test -x /opt/sbin/in.tftpd || exit 5

case “$1″ in

start)
echo “Starting TFTP daemon.”
/opt/sbin/in.tftpd -l -c -u admin -s /share/MD0_DATA/tftpboot
;;

stop)
echo “Shutting down TFTP daemon.”
killall in.tftpd
;;

restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;

*)
echo “Usage: $0 {start|stop|restart}”
exit 1

esac

3. create share to copy tftp files to … I use “tftpboot” (see Path above /share/MD0_DATA/!share!)

4. enable service in autorun.sh

Hint: The tftpd-hpa package depends on xinetd. I start the daemon as standalone. No effect on hibernation so far.


Back to Top | No Comments