Zabbix server on Ubuntu 18.04

Get network interface up and running sudo nano /etc/netplan/01-netcfg.yaml sudo netplan apply Zabbix repository wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+bionic_all.deb sudo dpkg -i zabbix-release_3.4-1+bionic_all.deb wget http://repo.zabbix.com/zabbix/3.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.5-1%2Bbionic_all.deb sudo dpkg -i zabbix-release_3.5-1+bionic_all.deb Required software sudo apt update && sudo apt-get upgrade sudo apt install apache2 mysql-server sudo apt install php php7.2-cli php7.2-mysql php7.2-common php7.2-curl php7.2-json php7.2-cgi libapache2-mod-php7.2 php7.2 sudo apt install php-gd...

Ubuntu 18.04 server administration

Install LAMP sudo apt update sudo apt install apache2 sudo apt install mysql-server sudo mysql_secure_installation sudo apt install php libapache2-mod-php php-mysql sudo apt install php-cli sudo apt-get install fail2ban sudo systemctl restart apache2 sudo systemctl status apache2 Adding a new user # Use adduser instead of useradd adduser # Give permission to new...

StrongSwan IPsec VPN with pre shared key and certificates

Install Strongswan sudo apt-get install strongswan Install haveged to speed up key generation later sudo apt-get install haveged sudo systemctl enable haveged sudo systemctl start haveged Enable route sudo nano /etc/sysctl.conf net.ipv4.ip_forward = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0   Troubleshooting ipsec up CONN_NAME ipsec down CONN_NAME ipsec restart ipsec status ipsec statusall Shows...

Dial in IPSEC (Site to Site) VPN on Ubuntu 16.04 with StrongSwan

STEP 1 Install Strongswan sudo apt-get install strongswan strongswan-plugin-af-alg strongswan-plugin-agent strongswan-plugin-certexpire strongswan-plugin-coupling strongswan-plugin-curl strongswan-plugin-dhcp strongswan-plugin-duplicheck strongswan-plugin-eap-aka strongswan-plugin-eap-aka-3gpp2 strongswan-plugin-eap-dynamic strongswan-plugin-eap-gtc strongswan-plugin-eap-mschapv2 strongswan-plugin-eap-peap strongswan-plugin-eap-radius strongswan-plugin-eap-tls strongswan-plugin-eap-ttls strongswan-plugin-error-notify strongswan-plugin-farp strongswan-plugin-fips-prf strongswan-plugin-gcrypt strongswan-plugin-gmp strongswan-plugin-ipseckey strongswan-plugin-kernel-libipsec strongswan-plugin-ldap strongswan-plugin-led strongswan-plugin-load-tester strongswan-plugin-lookip strongswan-plugin-ntru strongswan-plugin-pgp strongswan-plugin-pkcs11 strongswan-plugin-pubkey strongswan-plugin-radattr strongswan-plugin-sshkey strongswan-plugin-systime-fix strongswan-plugin-whitelist strongswan-plugin-xauth-eap strongswan-plugin-xauth-generic strongswan-plugin-xauth-noauth strongswan-plugin-xauth-pam   STEP 2 Setup Certificates haveged to speed...

Google oAuth with socialite in Laravel 5.3

Install socialite composer require laravel/socialite   Register Laravel\Socialite\SocialiteServiceProvider in your config/app.php under providers 'providers' => [...Laravel\Socialite\SocialiteServiceProvider::class,   Add socialite class into config/app.php under aliases 'aliases' => [...'Socialite' => Laravel\Socialite\Facades\Socialite::class,   Create Facebook apps API @ https://developers.facebook.com Create Google apps API @ https://console.developers.google.com   Add Facebook API credentials in config/services.php 'facebook' => [ 'client_id' => '', 'client_secret'...

Let’s Encrypt free ssl

Step 1. Install Let’s Encrypt Client sudo apt-get updatesudo apt-get install python-letsencrypt-apache Step 2. Setup SSL Certificate sudo letsencrypt --apache -d example.com -d www.example.com Step 3. Confirm and backup your cert and keys (private and public)Your certificate and chain will be storated at cat /etc/letsencrypt/live/example.com/fullchain.pem Step 4. Verify apache https .conf <VirtualHost *:443>...SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pemSSLCertificateKeyFile...

How to install Laravel in Ubuntu 16.04

Basic stuff sudo apt-get install gitsudo apt-get install zip   LAMP sudo apt-get install taskselsudo tasksel install lamp-server   CURL sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext   Enable mods sudo phpenmod mcryptsudo phpenmod mbstringsudo a2enmod rewritesudo systemctl restart apache2   Install Composer cd ~ curl -sS https://getcomposer.org/installer -o composer-setup.phpsudo php composer-setup.php --install-dir=/usr/local/bin...

Setup Self-Signed SSL Certificate for Apache running on Ubuntu

Activate SSL Module sudo a2enmod sslsudo service apache2 restart Create a Self-Signed SSL Certificate sudo mkdir /etc/apache2/sslsudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/xxx.key -out /etc/apache2/ssl/xxx.crt When prompted for Common Name (e.g. server FQDN or YOUR name) : Enter.your_domain.com CSR: (certificate signing request)-x509: Self-signed certificate file instead of generating a certificate...

Password protect with .htaccess & .htpasswd

Make changes to default.config sudo nano /etc/apache2/sites-enabled/000-default.conf Add the following inside the block <VirtualHost *:80> <Directory /var/www/html> Options Indexes FollowSymLinks MultiViews AllowOverride All  Order allow,deny allow from all</Directory> Apply new changes sudo service apache2 restart   Create a .htaccess file sudo nano /usr/share/phpmyadmin/.htaccess AuthType BasicAuthName "Restricted Files" AuthUserFile /etc/phpmyadmin/.htpasswd Require valid-user For Authentication sudo apt-get install apache2-utils Add...

Scroll to top