Archive for the ‘Linux router’ Category

Cure for VMware „STOP: 0x0000007B” error

A problem has been detected and windows has been shut down to prevent damage to your computer. If this is the first time you’ve seen this stop error screen, restart your computer. If this screen appears again, follow these steps: Check for viruses on your computer. Remove any newly installed hard drivers or hard drive […]

Mikrotik pptp, l2tp, eoip tunnel dns adress resolve script – VPN by domain name

Script is searching for interface by given name. It resolves dns name to ip addres, then checks if resolved ip addres is equal to address given in connect-to field of the interface. If ip address is different then script will update it to keep Your VPN connected to ip address given by a domain name. […]

LMS mbank parser – import customer payments from csv file

Skrypt: 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 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 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 -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 […]