Tag: Linux

  • Dynamic DNS Using LibCloud – EdgeRouter

    This tutorial is aimed for users with a dynamic IP, and a DNS host that does not support DynDNS. Basically, we will push our new IP every time that it changes. The steps outlined in this tutorial will work with the providers listed in [[https://ci.apache.org/projects/libcloud/docs/dns/supported_providers.html#provider-matrix|Apache’s documentation]], but I have only actually tested with Rackspace. === […]

  • Send Emails From Gmail Through Shell/Script – Linux

    [[[TOC]]] ——- =Intro= Sometimes there is a need to send an email via command line, or in a script (such as using PHP’s `mail()` method); but there is not an MTA (postfix, sendmail, etc) running on the machine. Note that while it is possible to set an MTA up as a gmail smarthost, they will […]

  • Configure OpenVPN with X.509 – Ubiquiti EdgeRouter Lite

    In this tutorial, we will be configuring an OpenVPN server with X.509 certs on a Ubiquiti EdgeRouter Lite. We will also go through how to connect a remote Linux client to the VPN. Below is a physical network diagram: {{{ +——————————–+ | Ubiquiti ERL | (Public IP)| | =============={eth2 eth0}============= | \ / | | […]

  • Configure Linux for Active Directory Authentication With SSSD

    In this tutorial, we will configure a Linux box to authenticate against Active Directory. There are a few different methods to go about this, we will use `sssd` because it is recommended by [[https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/SSSD-Introduction.html|Red Hat]] # Remove pam_ldap if it is installed {{{ # Red Hat/CentOS/Fedora yum remove pam_ldap # Debian/Ubuntu apt-get remove pam_ldap }}} […]

  • Enumerate Processes Programmatically In Linux

    Using `ps` is not necessarily the best way to enumerate running applications programmatically. This is because it will gather additional information that we do not actually need in most cases. The below examples illustrate how to enumerate running applications by reading the contents of `/proc`. **Python:** {{{ lang=python line=1 def get_procs(proc_name=None): ## Loop over /proc […]

  • Start a script on boot – Ubuntu 12.04

    Use the below procedure to start a script on boot: {{{ lang=bash sudo mv /filename /etc/init.d/ sudo chmod +x /etc/init.d/filename sudo update-rc.d filename defaults }}}

  • Expanding A Linux Filesystem

    [[[TOC]]] ———- = Expand the Partition/Logical Volume = * **LVM (Ideal Method)** {{{ vgextend LogicalVolume /dev/sdd #< Add /dev/sdd to volume group lvextend -l +100%FREE /dev/VolumeGroup/LogicalVolume #< Fill free space }}} * **Partitions (Through parted)** ** Open parted {{{ parted /dev/sdd #< Sub /dev/sdd for your HDD location }}} ** Display in sectors {{{ unit […]

  • Remote MakeMKV

    = CHECK OUT THE NEW VERSION W/ WEB UI – [[https://blog.laslabs.com/projects/remote-makemkv]] = ————- //**Provides a GUI usable for a headless server with multiple drives. Can sling through a SOCKS proxy**// [[[TOC]]] —— **Requires [[http://www.makemkv.com/|MakeMKV]], [[http://qt-project.org/downloads|QT 4]], `mkisofs` (For ISO functionality), `Python 2.7` (have not tested other versions), `PyQt4` (on client), `socksipy-branch` (on server and client)** […]

  • Ethernet Bonding – Ubuntu 12.10

    * Install package {{{ sudo apt-get install ifenslave-2.6 }}} * Enable Kernel Module: * `sudo nano /etc/modules` * add `bonding` to the end (if not already contained in the file) * Stop networking and load kernel module {{{ sudo stop networking sudo modprobe bonding }}} * Configure `/etc/network/interfaces` {{{ # The loopback network interface auto […]

  • Upgrade Ubuntu

    [[[TOC]]] ——— =LTS To Normal= * Update-Manager install, this may or may not already be installed {{{ sudo apt-get install update-manager-core }}} * Set `lts` to `normal` in `/etc/update-manager/release-upgrades` {{{ Prompt=normal }}} * Perform the upgrade {{{ sudo apt-get update sudo do-release-upgrade -d }}} ——— =Normal To LTS= * Update-Manager install, this may or may […]