NAT and VOIP

What is NAT?

NAT (Network Address Translation) is a technology most commonly used by firewalls and routers to allow multiple devices on a LAN with ‘private’ IP addresses to share a single public IP address. A private IP address is an address, which can only be addressed from within the LAN, but not from the Internet outside the LAN. In order to let a device with a private IP address communicate with other devices on the Internet, there needs to be a translation between private and public IP addresses at the point where the LAN connects to the Internet, that is within the firewall/router connecting the LAN to the Internet. Such a translation is commonly referred to as NAT (for Network Address Translation) and a router doing such translation is often called a NAT router or NAT firewall/router. Sometimes NAT is also called IP Masquerading. The passing of traffic through NAT is called NAT Traversal. Continue reading

Spreading a Data Project over Multiple Discs in Linux

After spending hours trying to find software in Linux that can span a large directory over multiple discs without having to create an archive set, I finally came across this small Python script that will do the job.

How to Use

Put the script(s) in your “~/bin/”.

mkdir work/
cd work
mkdir in/
mkdir out/

Make a link copy of your data in the “in” dir:
cp -vrl originals/* in/
xsplit_dvd.py

The dir work/out/ should contain the output dirs dvd_001, dvd_002, etc… Continue reading

Help, I’ve been blocked from my PBX!

[HOW TO] Help, I’ve been blocked from my PBX!

Note: This post assumes you’re running FreePBX Distro 13 or higher

If your FreePBX instance has suddenly become unreachable, chances are you’ve been blocked by one of the included network security mechanisms in FreePBX. The good news is that it’s working! The bad news is now you have to somehow work out a way to get yourself unblocked, figure out how you got blocked, and stop it from happening again.

What Blocked Me?

Intrusion Detection (fail2ban)

If you’ve suddenly lost access to the server, this is the most likely culprit. Intrusion Detection scans log files and looks for failed login attempts and other types of unauthorized access, and then temporarily bans the IP of the “attacker”. Continue reading

Virtualmin Server Configuration on Vultr VS

Initial Configuration

In your Vultr Control Panel, set up a Ubuntu Server instance and SSH into it. Then add a PPA that will provide your server with multiple PHP versions and update.

For Ubuntu Install
# add-apt-repository ppa:ondrej/php
# apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade

Now download the Virtualmin install script and run the install.

# wget http://software.virtualmin.com/gpl/scripts/install.sh
# sh install.sh

Next install different PHP versions. Continue reading

Network Booting LibreElec to Raspberry Pi’s from a Synology NAS

Work Environment

NAS: Synology DS216+II with DSM 6.1.7-15284

Netgear WNDR3700v2 Router Running Gargoyle Firmware version 1.10.0

Raspberry Pi’s

Before you begin

Enable SSH on the NAS.

If you have a battery backup unit then enable UPS.

Download LibreElec image files for all architectures of Raspberry Pi’s on the network (i.e. RPi1, RPI3)

If your router acts as the DHCP server in your network then it will need to support network booting (most do not) if you want to continue to use it as the DHCP server, otherwise you will need to disable DHCP on your router and setup a DHCP server on your NAS. An alternative is to install a Linux firmware to your router if it’s possible (i.e. OpenWRT, DD-WRT, etc.) which is the scenario used for this guide.
Continue reading

Building a TV Server on a Synology NAS (Updated)

Work Environment

NAS:  Synology DS216+II with DSM 6.1.7-15284

Before you begin:

Enable SSH.

If you have a battery backup unit then enable UPS.

You will need to donate $20 to http://mc2xml.awardspace.info to get a version of the software that will run on your Synology if it uses an ARM processor and won’t run the standard x86 version that you can download from the site. The DS216+II in this tutorial has an Intel x86 / x64 processor so the standard x86 version will work just fine.

You will also need a subscription to Schedules Direct.

Add SynoCommunity to your package sources. Install the latest version of Tvheadend. You might need to enable beta versions to get the latest version of the software.

Create a Windows Share folder on your Synology called “public” and make sure the “sc-media” user has read/write access to it.
Continue reading

Setting Up MythTV on an Odroid C2

passwd root
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt autoremove
reboot
apt-get install nano mariadb-server apache2 open-iscsi
nano /etc/apt/sources.list.d/webmin.list

deb http://download.webmin.com/download/repository sarge contrib
deb http://download.webmin.com/download/repository sarge contrib

wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
apt-get update
apt-get install webmin
Continue reading

Launchpad Configuration

  1. Import your PGP Keys
  2. Install dput, dh-make, & devscripts packages.
  3. Open /etc/dput.cf file and change Launchpad section to:
    [testppa]
    fqdn            = ppa.launchpad.net
    method            = ftp
    incoming        = ~[LaunchpadID]/testppa/ubuntu
    login            = anonymous
    allow_unsigned_uploads  = 0
  4. The following are the commands used to build source and upload to Launchpad.
    cd test-x.x.x.x
    dh_make –single –native –copyright apache –email [LaunchpadEmail]
    rm debian/*.ex debian/*.EX
    debuild -S –buildinfo-option=”-O”
    dput testppa ../test_x.x.x.x_source.changes

Moving/Copying your PGP Keys

Once you’re using PGP, you may want be able to sign email from more than location, or you may switch computers. There’s a few ways to accomplish this.

Copy All GnuPG Data

Your first choice is to copy all of your GnuPG data. This is a lot more data than just your key, but is still likely to be under 5MB. This method will copy all of your keys, everyone’s key you have, and your entire trust database. It’s ideal for backup, or for moving to a new computer. Simply copy all the contents of your GnuPG data directory, which would be as follows:

  • Windows: C:/Documents and Settings/username/application Data/GnuPG
  • Unix/Linux/Mac: ~/.gnupg

Where username is your windows username. Just simply copy the entire contents of that directory from one machine to the other and you will be set. There are many ways to move this data, which I won’t cover. Some examples might be zipping the data up and copying it to a disk.

This will also work between different operating systems.
Continue reading