depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Saving iptables with iptables-persistent

    May 28, 2014 by The Man

    To download

    sudo apt-get install iptables-persistent
    

    and then after you have made changes

    sudo dpkg-reconfigure iptables-persistent
    

  2. Password less sign in to Ubuntu

    May 14, 2014 by The Man

    First create your key (something like this but google for a better scope)

    ssh-keygen -t rsa -C "your_email@example.com"
    

    Remember you only need to do this once

    then on each Ubuntu server you want to log into. Changing username to your username and xx.xx.xx.xx to the ip or fqdn of the server.

    cat ~/.ssh/id_rsa.pub | ssh username@xxx.xxx.xxx.xxx "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys"
    

  3. Ubuntu & OpenStack running in a VM

    December 24, 2013 by The Man

    If you want to have a little play around with OpenStack before diving in or maybe you want to develop some cool software to interface with it, it can be handy to run OpenStack in a VM or on a single machine. Here is how I did it.

    1. I’m following the guide from http://devstack.org/guides/single-machine.html who have a handy script to automate the install.

    2. I’m using Ubuntu 13.10 64bit minimal version from https://help.ubuntu.com/community/Installation/MinimalCD

    3. Install Ubuntu as you would normally.

    4. Update with sudo apt-get update

    (more…)


  4. Ubuntu show IP address at login screen

    August 31, 2013 by The Man

    Sometimes it’s handy to know the ip address of an Ubuntu box before you log in, great for VMs

    First open /etc/rc.local

    sudo nano /etc/rc.local

    then add this line

    and you should get something like this

    Screen Shot 2013-08-31 at 01.02.52


  5. Add outbound port 25 for SMTP in VMware ESXi v5

    August 6, 2013 by The Man

    If you use the great backup script from ghettoVCB you have an option to email the logs. However the port is not open on the ESX firewall so

    1. Create a text doc called smtp.xml and add the following.

    
      
        SMTP_Outbound
        
          outbound
          tcp
          dst
          25
        
        true
        false
      
    
    

    2. Upload this file to /etc/vmware/firewall/

    3. Run esxcli network firewall refresh on the ESX device.

    All done


  6. Ubuntu install Webmin

    April 5, 2013 by The Man

    I like to use apt-get so here is how I usually install Webmin on Ubuntu. If you have never seen Webmin before it’s a great little tool to web manage your Ubuntu boxes. See it here.

    1. Add the Webmin repository to your system by opening

    sudo nano /etc/apt/sources.list

    then adding these two lines and saving

    deb http://download.webmin.com/download/repository sarge contrib
    deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

    2. Next we add the key so we can be sure we are getting the right files.

    wget http://www.webmin.com/jcameron-key.asc
    sudo apt-key add jcameron-key.asc

    3. Now just a quick update then install

    sudo apt-get update && sudo apt-get install webmin

    and hopefully this should take care of all the dependancies as well. Then simply log into your new console at https://boxname:10000

    Screen Shot 2013-04-05 at 08.48.17