Create an automated letsencrypt certificate for the Apache web service on Ubuntu 16.04


apt update && apt upgrade -y

apt-get install software-properties-common

add-apt-repository ppa:certbot/certbot

apt update && apt upgrade -y

sudo apt-get install python-certbot-apache

Add domain or subdomain name to create the certificate.
sudo certbot --apache -d smsk.biz -d www.smsk.biz

just for test renew
sudo certbot renew --dry-run

Reload apache service
/etc/init.d/apache2 reload

Add command to crontab for everyday renew.
Because you will be allowed to be renewal the day before your certificate is expire.
crontab -e
0 1 * * * sudo certbot renew --quiet
[wpedon id=”539″ align=”right”]

Loading

Linux Sunucularda herhangi bir log dosyasını syslog sunucuya aktarmak

Özel olarak faklı bir dosyaya yazılan loğları log sunucusuna göndermek için şu adımlar takip edilir.

Bu örnekte postgres pg_log dosyası içerisine kaydedilen loğları log sunucusuna gönderiyoruz.

Bu örnekler ilgili log dosyası kaynağı değiştirilerek ve etiketleme yapılarak çoğaltılabilir.

Önce konfigürasyon dosyamızı oluşturuyoruz.

Loading

Local Ubuntu Repository Server

If you want to setup this configuration you need to minimum 350Gb free disk space.

############### Server Side ###############

sudo apt-get install apache2

sudo apt-get install apt-mirror

sudo mkdir -p /Mirror/apt-mirror

sudo vi /etc/apt/mirror.list

Loading

OpenVas Installation on Ubuntu 16.04

Adding this PPA to your system

You can update your system with unsupported packages from this untrusted PPA by adding ppa:mrazavi/openvas to your system’s Software Sources.

sudo add-apt-repository ppa:mrazavi/openvas
sudo apt-get update

Loading

Nagios – Use an external smtp server to send notifications

One of the most important feature of Nagios is the notification system; by default Nagios will use the local mail daemon (mail) to send all the notifications.
Maybe this kind of system was working fine in past, but today, with this huge amount of spam circulating all over the world, this kind of emails from a not verified source can be filtered by the same company antispam system.
In order to avoid this issue I will explain how to configure Nagios using an external smtp server also with smtp authentication.

Loading

Connect remote Linux server with SSH Key and make Mac OSx alias for remote server

How To Set Up SSH Keys

About SSH Keys

SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

Loading

How to Install and Configure MRTG on Ubuntu Server

This post will describe how to install and configure Tobi Oetiker’s MRTG (Multi Router Traffic Grapher) on your Ubuntu server. All steps assume that the Apache http server is installed and operating correctly. Once configured, you’ll be able to use MRTG to monitor the traffic in and out of your network using the SNMP capability in your network’s gateway\router. MRTG generates static HTML pages containing PNG images which provide a visual representation of this traffic. MRTG typically produces daily, weekly, monthly, and yearly graphs. MRTG is written in perl and works on Unix/Linux as well as Windows. MRTG is free software licensed under the GNU GPL.

Loading

How do I kill another login session remotely on Ubuntu?

You can kill a Unix login session remotely by sending a hangup signal (SIGHUP) to the process running the login session. To do this, follow the steps below:

  1. Identify the shell you want to kill. To determine your current tty, from your Unix shell prompt, enter:
      tty
  2. To show all of your running processes, enter:
      ps -fu username

    Replace username with your username.

  3. You should see something like this:
      PID    TT  STAT   TIME COMMAND
      13964  v5   I      0:00 elm
      13126  ue   S      0:00 -bash (bash)
      13133  ue   R      0:00 ps x
      13335  v5   S      0:00 -bash (bash)

    In the first column, “PID” stands for “process ID”. The second column shows the tty to which your processes are connected. The dash (-) before a process name shows that the process is a login shell.

  4. To remove the remote shell, look for the processes with a dash and choose the process number that is not for your current tty. Then issue the following command:
      kill -HUP processid

    Replace processid with the process ID number you identified.

When you send a SIGHUP (by entering kill -HUP or kill -1) to a login shell, all the processes that were started in the shell will be killed as well (unless they were in the background). SIGHUP is good because it allows applications like Elm and Emacs to exit gracefully, leaving your files intact.

Note: You cannot kill processes that are running on a computer different from the one you are logged into. This rule extends to individual nodes within clusters of Unix systems as well.

Loading

Disable or Enable Apache SSL module

Disable SSL module

sudo a2dismod ssl
sudo a2dissite default-ssl
sudo service apache2 restart

Enable SSL module

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 restart

Loading

Zararlı alan adlarını dışa aktarmak

Merhaba Arkadaşlar,

Yakın zamanda yapmış olduğumuz “Zararlı Alan Adları” çalışmamıza bir katkı da KerimCan Kalıpcıoğlu arkadaşımızdan geldi. Değerli katkılarından dolayı kendisine teşekkür ediyorum.

Sayfamızda yayınladığımız Zararlı alan adlarını dışa aktarmak için bu script‘i kullanabilirsiniz.

python mal_url.py export.txt

şeklinde çalıştırmanız yeterli. Tüm listeyi text formatında kaydediyor. Nerede, nasıl kullanmak istediğiniz Sizin fantazinize kalmış artık.

İsteyen script kodunu buradan kopyalayabilir.

Loading