Archive for the ‘Linux router’ Category

LMS mbank parser – import customer payments from csv file

Skrypt: http://vberry.net/wp-content/uploads/2012/04/lms_mbank_parser.7z Skrypt pozwala importować pliki csv z mbanku prosto do tabeli cashimport lmsa. Testowany z wersją 1.11.9 Moloc (1.1006/1.29). Skrypt zapisuje wiersze nie przetworzone w pliku /var/log/lms/cashimport.log, więc ta ścieżka musi istnieć i mieć prawa do zapisu. skrypt poszukuje frazy ID:xxxx gdzie xxxx – czterocyfrowy nr id klienta np 0001 i na tej podstawie […]

Mount usb ntfs hard drive under linux

Tested under debian squeeze. We need package ntfs-3g. apt-get install ntfs-3g cat /var/log/messages We must find what is the drive name, eg /dev/sdc1 – partition one on hard disk sdc (master second channel) Now mount hard disk under dir /mnt: mount -t ntfs /dev/sdc1 /mnt When You finish useing hard drive unmount it, to avoid […]

SCP file copy over ssh

Quick command: scp <filename> user@<ip address of remote>:<target dir> example: scp MyLocalFile.tgz RemoteUser@RemoteServer:.   will copy file MyLocalFile.tgz  to home dir of user RemoteUser at RemoteServer Copy whole directory: scp -r /home/mydir RemoteUser@RemoteServer:.

Debian squeeze inotify udev problem solution

If You cannot boot after system upgrade from Debian Lenny to Squeeze, You are using custom kernel and You can see on of these message: udevd[518]: inotify_init failed: Function not implemented udevd[518]: error initializing inotify Then probably You must check following options in your kernel config file : File systems —> [*] Dnotify support [*] […]

Dynamic DNS Update – Mikrotik

Simple script for dynamic DNS update is presented below. Script was tested with changeip.org service and probably works for similar services too. This script works also behind NAT connection. To make it run automatically one must add this script to system scheduler. NOTICE: On every test script writes small file to a hard drive. One […]

Apache self signed SSL certyficateGenerowanie certyfikatu „self-signed” dla apacha

It`s necessary very often to encrypt traffic to some web site, but we don`t want use certyficate center or create our own certyfication center. In this case the fastest and most convienient way is to generate self-signed certyficate. We do this as follows: openssl genrsa -out mydomain.pl.key 1024 openssl req -new -x509 -days 365 -key […]

Sending mail under linux console – mail commandWysyłanie poczty pod konsolą linuxa – komenda mail

From time to time you want to send yourself a file from the server. A convenient method is to send a file using email. Of course, this is done so rarely that I never remember the syntax:) Here’s an example how to send mail with content of the script (text file): mail recipient@bby.com.pl -s „subject” […]

Linux system copy over network using tar and sshKopiowanie systemu linux przez sieć przy pomocy ssh i tar

We assume that on the machine root@address, we have mounted hard disk under /mnt/dest (it is the target machine, which we copy the operating system to). I assume that we are logged in to the source system (which we copy the operating system from). We  copy one directory after another, the entire operating system. Command […]

Blocking p2p software – iptables string moduleBlokowanie programów p2p – iptables moduł string

1. Goal Block p2p programs. 2. Action We are useing iptables, netfilter, patch-o-matic module named string and kernel 2.4.2x 1. Cel Zablokowanie programów p2p. 2. Działanie Wykorzystujemy iptables, netfilter latke patch-o-matic o nazwie string i kernel 2.4.2x

Logic gameGra logiczna

Logic game – what ESA (Electronic and computer automation systems) students do 😉Logic game –  oto czym naprawdę zajmują się studenci ESA (Elektroniczne i komputerowe systemy automatyki)