Hello and welcome to #root.bg!
Here you can find tutorials about linux, networks and their firewall, games and fun, as well as hobbies – rollers, drones and many more.
Блогът на Николай Николов
Here you can find tutorials about linux, networks and their firewall, games and fun, as well as hobbies – rollers, drones and many more.
Hello, For a few days in my head I have a rogue scheme to do root.bg already in English.
Thanks Slavena for the idea she gave me!
That’s why the blog has been unstable since Monday.
For starters, I will translate all the pages and then gradually translate the posts in a little bit.
Thats it!
Hello,
Since mcrypt version 7.1 is no longer supported by PHP developers,
and 7.2 can no longer be installed.
In this post I will share how we can install mcrypt on the WHM server in php7.2.
We execute the following commands :
Install EPEL repo :
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
We install the necessary libraries for mcrypt :
yum install libmcrypt yum install libmcrypt-devel
Install mcrypt via PECL :
/opt/cpanel/ea-php72/root/usr/bin/pecl install channel://pecl.php.net/mcrypt-1.0.1
We test whether the module is successfully installed :
/opt/cpanel/ea-php72/root/usr/bin/php -m|grep mcrypt
Thats it!
Hello,
In this post I will share how we can exclude the special characters of our MacOS.
The following table lists these symbols, and in order to use, we just hold the specified letter or the combination below.

| Accent | Key Strokes | Available Characters |
| Grave ` | option ` + the character | À È Ì Ò Ù à è ì ò ù |
| Acute ´ | option e + the character | Á É Í Ó Ú á é í ó ú |
| Circumflex ^ | option i + the character | Â Ê Î Ô Û â ê î ô û |
| Tilde ~ | option n + the character | Ã Ñ Õ ã ñ õ |
| Umlaut ¨ | option u + the character | Ä Ë Ï Ö Ü Ÿ ä ë ï ö ü ÿ |
| Key Stroke | +Option | +Option- Shift | Key Stroke | +Option | +Option- Stroke |
| A | å | Å | 0 | º | ‚ |
| B | † | ¹ | 1 | ¡ | Ž |
| C | ç | Ç | 2 | ™ | € |
| D | | Î | 3 | £ | Ð |
| E | ´ | 4 | ¢ | ð | |
| F | ƒ | Ï | 5 | ƒ | Þ |
| G | © | › | 6 | § | þ |
| H | ™ | Ó | 7 | ¶ | ý |
| I | ˆ | 8 | • | ° | |
| J | | Ô | 9 | ª | · |
| K | š | • | – | – en dash | — em dash |
| L | ¬ | Ò | = | ‚ | ± |
| M | µ | Â | [ | “ | ” |
| O | ø | Ø | ] | ‘ | ’ |
| P | ¼ | ½ | \ | ´ | ª |
| Q | œ | Œ | ‘ | æ | Æ |
| R | ® | ‰ | , | ¾ | ¯ |
| S | ß | Í | . | „ | ˜ |
| T | Ý | | ; | … | Ú |
| U | ¨ | ` | ` | ||
| V | ˆ | × | / | ÷ | ¿ |
| W | … | „ | |||
| X | ‰ | œ | |||
| Y | ¥ | Á | |||
| Z | ‡ | ¸ |
When writing in a terminal or anywhere else in our MacOS, things happen somewhat slower than a linux desktop, for example. This is precisely because of these special symbols.
A typical example is the deletion or forwarding or forwarding of an IDE or a terminal – it is very slow!
To fix this problem, we need to write the following 3 lines in our terminal and then exit the user and log in again (or restart the mac)
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false defaults write NSGlobalDomain KeyRepeat -int 1 defaults write NSGlobalDomain InitialKeyRepeat -int 12
The result is impressive!! 🙂
If we accidentally want to go back to his old one – to have special characters we have to write in the terminal and get out again and get in :
defaults write -g ApplePressAndHoldEnabled -bool true
Thats it !
Hello,
In this post I will share how we can protect our site if we use nginx for a web server.
Led by Scott Helme for CSP, I started to test the CSP header of root.bg. I used his securityheaders.com tool and finally achieved the desired result – A + 🙂
In the virtual host of our site we add the following lines after location /
add_header Content-Security-Policy "block-all-mixed-content; frame-ancestors 'self' root.bg cdn.root.bg s.root.bg go.root.bg git.root.bg fonts.gstatic.com;"; add_header Content-Security-Policy-Report-Only "default-src https: data: 'unsafe-inline' 'unsafe-eval'; report-uri https://rootbg.report-uri.com/r/d/csp/reportOnly";
I made a report on the site report-uri.com and so I started collecting information from my webserver for XSS attacks, web server configuration errors, monitoring and everything else related to the new web standards.
I personally have a bit of luck with the addition of redundant header, but almost all of them are for protection 🙂
HTTP/2 200 date: Wed, 17 Oct 2018 07:13:17 GMT content-type: text/html; charset=UTF-8 vary: Accept-Encoding set-cookie: PHPSESSID=d2lar8sp9vq24752mip9lu31ls; path=/; secure; HttpOnly expires: Thu, 19 Nov 1981 08:52:00 GMT cache-control: no-store, no-cache, must-revalidate pragma: no-cache x-powered-by: 🐧 link: https://root.bg/wp-json/; rel="https://api.w.org/" link: https://go.root.bg/21; rel=shortlink server: rws strict-transport-security: max-age=31536000; includeSubDomains; preload x-cache: HIT x-xss-protection: 1; mode=block; report=https://rootbg.report-uri.com/r/d/xss/enforce x-frame-options: SAMEORIGIN x-content-type-options: nosniff p3p: Can I help you? Contact me via https://root.bg/contacts/, CP=CAO ADMa DEVa IND PHY ONL UNI COM LOC feature-policy: sync-xhr 'self' https://root.bg content-security-policy: block-all-mixed-content; frame-ancestors 'self' root.bg cdn.root.bg s.root.bg go.root.bg git.root.bg fonts.gstatic.com; content-security-policy-report-only: default-src https: data: 'unsafe-inline' 'unsafe-eval'; report-uri https://rootbg.report-uri.com/r/d/csp/reportOnly referrer-policy: no-referrer-when-downgrade expect-ct: enforce; max-age=86400; report-uri=https://rootbg.report-uri.com/r/d/ct/enforce x-app-server: gevi x-slogan: Respect is earned, not given!
Thats it!
Имало едно време един понеделник, един сисадмин и един SSL сертификат за един сайт, който не работел както трябва, защото трябвало да му се доконфигурира един Intermediate CA Certificate.
Да, ама той бил в пощата на сисадмина. За да си го вземе от пощата, трябвало да се излекува мейл сървъра, който бил на смъртен одър вече цяла неделя.

Сисадминът освен всичко бил и шаманът на селото. Пуснал си един пси транс, за да влезе в транс и да получи видение. Дошло видението и му подшушнало, че за да вдигне мейл сървъра си на крака, трябва да намери Бекъп Безсмъртни, който бил вдън гори тилилейски и трябва да измоли от него да му даде яйцето, в което се помещава душата на мейл сървъра.
Отишъл посред нощ сисадминът в гората, през работно време, намерил Бекъп Безсмъртни и му се примолил да му даде яйцето.
Бекъп му казал, че яйцето не е у него, но все пак се съгласил да му помогне при едно условие – сисадминът трябвало да достави един мейл до едно село на края на света, където живее баба Qmail.
Нищо работа. Съгласил се сисадминът и тръгнал да доставя мейла. Не щеш ли, както си вървял го настигнали едни 160’000 спама, с които се борил една нощ и един ден, та чак до 5:12 следобед. Отначало злите спамове измирали трудно, един по един, но в края на борбата започнали да падат със стотици в секунда.
Със сетни сили сисадминът успял да убие и последния спам. Огледал се той и видял, че 30 GB от полето е покрито с мъртъв спам.
Хапнал един банан и после продължил по пътя си.
Стигнал до селото на края на света, а на портата на селото го посрещнали едни бедни tls ciphers.
Избитият спам ги тероризирал много и те били толкова изпосталели, та чак били станали с големина 0.
Героят ни ги съжалил и ги изгенерирал отново. За отплата за добрината те му показали къде живее баба Qmail и му дали един свитък с много тайно заклинание, което ако се отворело в беда, щяло да му помогне. Благодарил им и си продължил към бабата.
Сисадминът я намерил в края на селото, на три пресечки от пощата, и й дал писмото, а тя за благодарност му дала яйцето с душата на мейл сървъра.
Върнал се нашият супер-юзър при берящия душа мейл сървър, опекъл му яйцето на хартийка, той го хапнал и мигом оздравял.
Но уви SSL-ът не тръгвал и не тръгвал. Юнакът се сетил за заклинанието, отворил го и се зачел в него.
Там пишело да каже на мейл сървъра да му даде, не само единия, а и двата Intermediate CA Certificat-и, след което да ги залепи един за друг с плюнка и да каже вълшебната многосричкова дума “Аре-тръг-ни-де-че-ми-пис-на-цел-ден-са-мо-с-теб-да-се-за-ни-ма-вам!”
Речено-сторено. Веднага след като го направил SSL сертификатът избухнал в светлини, цветомузики и много други специални ефекти, заскърцал леко, след което проработил с адска сила. Всички браузъри и мейл клиенти по света ахнали от почуда и радост, а сисадминът си отдъхнал и lived happily ever after поне до началото на другия понеделник.
Край! 🙂
“Сисадминът и SSL сертификата 🙂“
Hello,
The main idea of this is :
We have bare-metal server A and we want to copy the virtual machine from A to bare-metal server B. If the virtual machine is 80GB and the connectivity between the two servers is 1GB the transfer will be ready for 20 minutes.
If our virtual machine is 1GB big, the transfer will still take so much because we will transfer all 80GB – 79GB of which zeros.
In this post I will share a way with tar how to avoid this annoying transfer of redundant data to sparse files.
For the test, I created a virtual machine with a size of 80GB hard drive :