Installing Netflix on OSMC

Netflix can be installed on OSMC as na add-on program. Here are the steps in activating the add-on.

  1. Download installer script
  1. Change file mode to executable
chmod +x netflix_prep_install.sh
  1. Run the installer script. This will install all the necessary programs required by the add-on. Just follow the on-screen instructions.
  1. In the homescreen, go to Add-Ons
  2. Install add-on from ZIP file. Browse to the default add-on directory. You should be able to see the ZIP file (plugin.video.netflix.zip) downloaded by the installer script. This may take a while so be very patient.
  3. The plugin should be available now under Video. On initial run, it will ask for your Netflix credentials.
  4. On initial playback, the add-on will download a 2GB restore image necessary to play the videos.

Resetting your WordPress password through MySQL/MariaDB Command Line

  1. Login to you database server.
    mysql -u root -p
  2. Select your WordPress database
    USE <name of WordPress database>;
    USE wordpress;
  3. Show the tables and look for the table where it ends with “users”.
  4. List the contents of the users table or find the username you want to reset. Take note of the users’ current password hash.
    SELECT user_login, user_pass FROM <users table>;
    SELECT user_login, user_pass FROM wp_users;
    SELECT user_login, user_pass FROM <users table> WHERE user_login LIKE '%<search string>%';
    SELECT user_login, user_pass FROM wp_users WHERE user_login LIKE '%admin%';
  5. Update the password of the user you like to reset.
    UPDATE <users table> SET user_pass=MD5('<new password>') WHERE user_login = '<user login>';
    UPDATE wp_users SET user_pass=MD5('mysecurepassword') WHERE user_login = 'admin';
  6. You will receive a confirmation message if the change was successful.
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
  7. Confirm if the password has changed based on the new hash generated.
    SELECT user_login, user_pass FROM <users table> WHERE user_login = '<user login>';
    SELECT user_login, user_pass FROM wp_users WHERE user_login = 'admin';
  8. You may now login using the new password set.

Resetting a VPN connection on CISCO ASA-5505

A had this challenge on how to reset or reconnect the VPN service in the office whenever I am mobile and do not have access to the Cisco ASDM-IDM. I do however have access to the device via SSH, so here is how you can reset or reconnect the VPN session using CLI.

  1. Connect and login to the device via SSH (granting you have already enabled the service on your device).

    iOS: Terminus 3.6.3
    Android: Terminus 3.0.5
    or any of your preferred SSH client.

  2. Enable config mode.
    Type help or '?' for a list of available commands.
    CISCO> enable
    Password: ********
  3. Get a list of the site-to-site VPN tunnels that are up. Issue the following command:
    CISCO# show vpn-sessiondb l2l
    Output example:
    Session Type: LAN-to-LAN
    Connection   :
    Index        : 4                      IP Addr      :
    Protocol     : IKEv1 IPsec IPsecOverNatT
    Encryption   : IKEv1: (1)3DES  IPsec: (1)3DES  IPsecOverNatT: (1)3DES
    Hashing      : IKEv1: (1)SHA1  IPsec: (1)SHA1  IPsecOverNatT: (1)SHA1
    Bytes Tx     : 8022844                Bytes Rx     : 389894534
    Login Time   : 09:56:20 PHST Wed Aug 1 2018
    Duration     : 1h:31m:11s
  4. You can now logoff or disconnect the VPN session using the “Index” number.
    CISCO# vpn-sessiondb logoff index 4
  5. Confirm the session has been restarted, issue the following command and check the “Login Time” and “Duration”.
    CISCO# show vpn-sessiondb l2l

Upgrading Ubuntu desktop or headless server

      1. Upgrade existing software.
        sudo apt update && sudo apt dist-upgrade
      2. Make sure you have update-manager-core package installed.
        sudo apt install update-manager-core
      3. Edit the configuration file /etc/update-manager/release-upgrades
        sudo nano /etc/update-manager/release-upgrades
      4. Change the value of Prompt from lts to normal.
      5. Save and close the file and run the following command to begin the upgrade process and follow the on-screen instructions.
        sudo do-release-upgrade
      6. Once the upgrade is finished, reboot your Ubuntu desktop or server.
      7. To check your Ubuntu version, run:
        lsb_release -a



Throttling bandwidth in CISCO ASA 5505

This example shows how to throttle the bandwidth to 1 Mbps for a specific user in the outbound direction.

  1. Create access list:
    ciscoasa(config)# access-list WEB-LIMIT permit ip host any
    ciscoasa(config)# class-map Class-Policy
    ciscoasa(config-cmap)# match access-list WEB-LIMIT
  2. Create policy map:
    ciscoasa(config)# policy-map POLICY-WEB
    ciscoasa(config-pmap)# class Class-Policy
    ciscoasa(config-pmap-c)# police output 1000000 conform-action transmit exceed-action drop
  3. Enable the policy:
    ciscoasa(config)# service-policy POLICY-WEB interface outside

Enable SNMP on ESXi 6.5

  1. SSH or Telnet to your ESXi node using root-level credentials.
  2. Execute the following commands. Replace YOUR_STRING with your desired community string.
    esxcli system snmp set -r
    esxcli system snmp set -c YOUR_STRING
    esxcli system snmp set -p 161
    esxcli system snmp set -L "City, State, Country"
    esxcli system snmp set -C noc@example.com
    esxcli system snmp set -e yes
  3. Check status in Host –> Manage –> Services, you should see snmpd as “Running”