Category: Linux

How to block by Referer, User Agent, URL, query string, IP and their combinations in mod_rewrite

As part of the fight against the influx of bots to the site (see the screenshot above), I had to refresh my knowledge of mod_rewrite. Below are examples of mod_rewrite rules that allow you to perform certain actions (such as blocking) for users who meet a large number of criteria at once – see the most recent example to see...

How to prevent NetworkManager and other programs from modifying the /etc/resolv.conf file

The /etc/resolv.conf file contains a list of DNS servers that are used to resolve hostnames to IP addresses. NetworkManager, which is responsible for making network connections, automatically changes the contents of this file. The replacement takes place without notifying the user and can lead to unpleasant consequences – for example, causing a DNS leak, which negatively affects anonymity. It can...

How to find out which process is modifying a file

Linux has an auditing platform that lets you know when files or/and folders is being accessed, modified, or executed. You can also monitor changes in entire directories. How to install auditd (auditctl) On Debian, Linux Mint, Kali Linux, Ubuntu and their derivatives, to install, run the command: sudo apt install auditd In Arch Linux, Manjaro, BlackArch and their derivatives, this...

How to Update HackRF One Firmware (SOLVED)

To check the version of the installed software and HackRF firmware, run the command: hackrf_info As you can see, the version of the software installed on this computer is now 2021.03.1: hackrf_info version: 2021.03.1 libhackrf version: 2021.03.1 (0.6) And firmware version 2018.01.1: Firmware Version: 2018.01.1 (API:1.02) You can make sure that this is the latest software version on this page:...

Error “curl: (1) Received HTTP/0.9 when not allowed” (SOLVED)

cURL is a popular command line utility that supports many network protocols. curl supports HTTP with numerous options and variations. It can speak HTTP version 0.9, 1.0, 1.1, 2 and 3 depending on build options and the correct command line options. But when the remote host does respond with HTTP/0.9, curl fails with an error that HTTP/0.9 is not allowed,...

How to change the language of Google Chrome and Chromium on Linux

If you look at the process of changing the language in Google Chrome or Chromium in Windows, then everything is quite simple there: you need to enter chrome://settings/languages in the address bar of the browser, or you can use the menu: Settings → Advanced → Languages. Then expand the “Language” item, select the desired language and click on the three...

Error “ruby-bundler: /usr/share/man/man5/gemfile.5.gz exists in filesystem (owned by ruby)” (SOLVED)

Whenever operating system packages are updated (as well as when new packages are installed), in addition to checking dependencies, package managers also check that there is no file conflict. That is, a package containing files that are already on disk and do not belong to this package will not be updated or installed. During a regular system update (Arch Linux,...

How to run PHP script on the command line (without web server)

How to run PHP script on Windows command line If you want not only the ability to run PHP from the command line, but also a full-fledged Apache + PHP + MySQL web server on Windows, then complete the installation according to this article. To run PHP on the command line, you do not need to install a web server,...

Ubuntu in VirtualBox does not stretch to full screen although Guest Additions are installed (SOLVED)

1. Are the Guest Additions actually installed? First, make sure you actually have Guest Additions installed. It is recommended to update the guest OS to the latest package versions: sudo apt update sudo apt full-upgrade After the update is complete, restart your computer: reboot There is a guest additions package in the standard repositories. It can be installed as follows:...

Error “Failed to talk to init daemon” (SOLVED)

You can use command line to shutdown Linux computer, following command will shutdown computer: shutdown -h now systemctl halt To reboot, you can use the following command: systemctl restart They usually work fine, but on some distributions they require elevated privileges, which means they need to be run with sudo. But in single user mode, these commands result in the...
Loading...
X