Archive for the Inne Category

Jul 15 2023

openvpn renew server cert

Stop openvpn server

List issued certs in
ls -alh /etc/openvpn/easy-rsa/pki/issued
cd /etc/openvpn/easy-rsa
./easy-rsa renew <cert-name>

copy new cert file from /etc/openvpn/easy-rsa/pki/issued
and
new key file from /etc/openvpn/easy-rsa/pki/private
to folder /etc/openvpn

create /etc/openvpn/auth.txt with key’s password
chmod 600 /etc/openvpn/auth.txt

add line to /etc/openvpn/server.conf
askpass /etc/openvpn/auth.txt

start openvpn server

Jun 17 2023

openDKIM – no signature data

if you see this message

2023-06-17T21:18:24.773384+02:00 git opendkim[317371]: BADFE5FE6B: [192.168.1.25] [192.168.1.25] not internal
2023-06-17T21:18:24.773568+02:00 git opendkim[317371]: BADFE5FE6B: not authenticated
2023-06-17T21:18:24.774566+02:00 git opendkim[317371]: BADFE5FE6B: no signature data

Add to /etc/postfix/main.cf

milter_connect_macros = j {daemon_name} v {if_name} _
milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_type} {auth_authen}"

 

Jun 16 2023

PHP install extensions

apt -y install php8.2-{apcu,bcmath,bz2,cgi,cli,common,curl,fpm,gd,gmp,igbinary,imagick,imap,intl,ldap,mbstring,mysql,opcache,pgsql,readline,redis,soap,sqlite3,xml,zip}

a2enmod proxy_fcgi setenvif

a2enconf php8.2-fpm

a2disconf php8.1-fpm

systemctl reload apache2

Oct 22 2013

CellPipe 7130 – hasło admina

Ściągnięte z wątku: CellPipe 7130 – hasło admina
Wystarczy wyeksportować ustawienia (http://10.0.0.1/backupsettings.html) i przeczytać :).
Hasło w pliku jest zakodowane w base64.
Dekodowanie hasła w linuksie
echo “password” | base64 -d

Sep 28 2012

Wykrywacz kłamstw PL

Jun 21 2012

nBox factory reset / hard reset

CLRA:
1) factory reset: EPG + REC + STRZAŁKA W GÓRE
2) hard reset: EPG + RES + STRZAŁKA W DÓŁ

BSLA/BZZB:
1) factory reset: EPG + REC+ STRZAŁKA W GÓRE
2) hard reset: EPG + RES + STRZAŁKA W PRAWO

Jan 9 2012

OS X: Ten Boot Options for Leopard

To use these boot shortcuts or commands, hold down the bolded keypress while your system is booting up. If it does not work, you probably did not start holding down the key (or key combination) soon enough.

shift – Safe Mode

Booting with the shift key depressed starts OS X in Safe Mode with Account preferences ignored and unessential kernal extensions / kexts disabled.

option – Startup Manager

Booting with the option key depressed starts OS X with the Startup Manager which allows the user to select which OS or partition from which to boot.

Mouse button – Eject Media

When the user boots with the mouse key depressed, any media in the drive such as a DVD or CD is ejected.

cmd v – Verbose Boot

If this key command is held down when booting, all the startup messages that are typically hidden will be displayed. This is an excellent method for debugging booting issues.

c – Boot from CD/DVD

Booting with the “C” key held will tell the system to boot directly from a CD/DVD in the drive.

t – Target Mode

If the “T” key is held during the bootup, the computer will be placed in target mode. This basically allows the computer to be accessed by other systems as a FireWire drive. Other computers can read, write, or mount the target mode system just like any other FireWire drive.

Other Bootup Shortcuts —

cmd s – Single User Mode

x – OS X Force boot

r – PowerBook Display Reset

n – Boot up from NetBoot Server

Apr 12 2011

Import bazy Teryt do MSQL

Baza danych teryt jest dostępna publicznie na tej stronie.

Ściągamy i rozpakowujemy pliki do jakiegoś katalogu dostępnego także z poziomu przeglądarki www.

Ściągamy plik Unserializer.php

Pliki php do importu simc.php terc.php ulic.php wmrodz.php
Tworzymy bazę teryt w mysql-u:teryt.create.sql_.
Dodajemy użytkownika z uprawnieniami (przynajmniej INSERT) do bazy teryt.
Po kolei uruchamiamy skrypty simc.php terc.php ulic.php wmrodz.php z przeglądarki.
Skrypty wykonują się dość długo i zajmują sporo pamięci, ja musiałem na czas impotu zmienić wpisy w php.ini (i zrestartować apache’a)
max_execution_time = 240 ; Maximum execution time of each script, in seconds
memory_limit = 1024M ; Maximum amount of memory a script may consume (128MB)

Dla leniwych: Baza danych teryt w formacie MYSQL (stan na 2011.04.12.)

Mar 18 2011

Instalacja Windows7 z USB

Potrzeba:

obraz Windows 7

USB Pen Drive (>=4GB)

MBRwiz do pobrania stąd.

1. Sformatuj PenDrive

2. Otwórz command Prompt ( Start Menu -> run -> cmd ) i  wpisz  convert e: /fs:ntfs (gdzie e: to litera dysku USB)

3. Podmontuj obraz dysku Windows 7

4. w command prompt wpisz:

mbrwiz /list (zanotuj numer twojego PenDrive’a)

mbrwiz /disk=X /active=1 (X to numer dysku USB)

exit

5. Otwórz drugi command prompt i wpisz

y: (litera dysku na którym jest podmontowany Windows 7)

cd boot

bootsect /nt60 E: (gdzie E: to litera dysku USB) -jeśli robisz to na komputerze z Windows Vista lub nowszym

bootsect /nt52 E: (gdzie E: to litera dysku USB) -jeśli robisz to na komputerze z XP

6. Skopiuj wszystkie pliki z Windows7 na USB

7. Uruchom ponownie komputer z dysku USB

Nov 5 2010

APC – wymiana baterii i kalibracja

1. Wymienić baterię i naładować do pełna UPS-a.
2. Wpisać nową datę baterii do EPPROM-u za pomocą programu apctest.
3. Odłączyć kabel sygnałowy.
4. Podłączyć do UPS-a obciążenie przynajmniej 30% (koniecznie !!!) i poczekać na całkowite rozładowanie.
4. Podłączyć kabel zasilający UPS bez włączania UPS-a i poczekać aż się do pełna naładują.
5. Podłączyć komputer, kabel sygnałowy i włączyć UPS-a.