Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

47 total results found

Reverse proxy

IT Apache

Some apache modules have to be enabled: sudo a2enmod ssl sudo a2enmod proxy sudo a2enmod proxy_balancer sudo a2enmod proxy_http Virtual hosts files have to be configured <VirtualHost *:*> ProxyPreserveHost On ProxyPass "/" "http://192.168.111.2/...

Basic authentication

IT Apache

To protect some directory with basic authentication we have to edit the virtual host file and add some configurations like this: <Directory /home/someuser/somesite/public_html> AuthType Basic AuthName "Authentication Required" AuthUserFile "/home/s...

HTTPS (SSL)

IT Apache

  add-apt-repository ppa:certbot/certbot apt install python-certbot-apache certbot --apache -d your_domain -d www.your_domain https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-18-04-pt   Adding subdomain to exis...

Git

IT

  http://rogerdudler.github.io/git-guide/  Approve user and set it admin via gitlab-rails root@vps02:~# gitlab-rails console -e production -------------------------------------------------------------------------------- Ruby: ruby 3.2.5 (2024-07-26 re...

Users and groups

IT Linux Administration

Adding an existing user to an existing group usermod -a -G theExampleGroup theExampleUser Changing the primary group of an existing user usermod -g theExampleGroup theExampleUser See wich groups the user belongs to groups theExampleUser Add an existing user to...

Passwords

IT Linux Administration

Use pwgen to generate ramdom passwords pwgen will generate easy to remember passwords # pwgen Vi6yoo9K loisae4A Eeboo9Ci phahc9Ba Eic0teej Mithuij4 ahSah0oh Aiquao7t Xai1mab1 sahx5veZ fai4Osah Hieg0Tai ohz0Ahth wa5ohLai Ol0ielah Phaeshi4 eemeKio8 AeNgei5i thoh...

SSH / SCP without known_hosts check

IT Linux Administration

When we want to connect to a remote host using different credentials and we have automatic login with public key, we have to use some tweaks adding some parameters to scp, like this: -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null Example: scp -o S...

Ubuntu startup mode

IT Linux Administration

  Show current default target sudo systemctl get-default To start in multi-user mode (text mode) sudo systemctl set-default multi-user.target  To start in graphical mode (X mode) sudo systemctl set-default graphical.target     https://askubuntu.com/questions/8...

Testing networking services

IT Linux Administration

Netcat Testing networking services to troubleshoot communications can be easily done with netcat like so: nc -l -p 8000 Source: https://ubidots.com/blog/how-to-simulate-a-tcpudp-client-using-netcat/

link
https://ubidots.com/blog/how-to-simulate-a-tcpudp-client-using-netcat/

Services

IT Linux Administration

Managing services with systemctl Start sudo systemctl start application.service Stop sudo systemctl stop application.service Status sudo systemctl status application.service Enabling service autostart on system boot sudo systemctl enable application.service Di...

Securely delete files and directories

IT Linux Administration

Shred shred -zvu -n 3 fileToDelete Wipe wipe -rfi privateDirectory/* SRM (secure remove) srm -vz privateDirectory/*   https://www.tecmint.com/permanently-and-securely-delete-files-directories-linux/

rsync

IT Linux Administration

https://serverfault.com/questions/529287/rsync-creates-a-directory-with-the-same-name-inside-of-destination-directory  

IPTables

IT Linux Administration

Allow All Incoming HTTP   sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT   link: https://www.digitalocean.com/community/tutorial...

Mounting ISO images under FreeBSD

IT Linux Administration

https://makandracards.com/jan0sch/13431-mounting-iso-images-under-freebsd  

Console on serial port

IT Linux Administration

Example using RedHat Linux 6.0 Using lilo bootloader Edit /etc/lilo.conf append="console=tty0 console=ttyS0,9600n8" boot=/dev/hda map=/boot/map install=/boot/boot.b prompt default=linux # Changes for serial console on COM1: in global section # Deleted: messa...

Some useful commands

IT Linux Administration

Here is how to join two files side by side in columns, delimited by ";" paste file1 file2 -d ";"  

Ramdisk

IT Linux Administration

Creating a ramdisk for fast read/write and comparing it with HDD/SSD drive using dd: # Creating a directory to mount RAM disk mkdir /mnt/ramdisk # mounting ramdisk sudo mount -t tmpfs -o size=1G tmpfs /mnt/ramdisk # Dropping caches before testing for fair di...

Aliases on shell

IT MacOS

Since .bashrc is not working, i managed to do some tricks Edit /etc/profile and add the following lines.......