Tuesday, January 14, 2014

OpenWRT: opening ports to the WAN (aka NAT, aka port forwarding)

Opening a port to a LAN computer is simple, you can do it from the GUI:
# Port 22422 -> 10.0.0.109:22422
config redirect
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option src_dport '22422'
        option dest_ip '10.0.0.109'
        option dest_port '22422'
        option proto 'tcp'
        option name 'Allow-SSH-bob' 
Opening a port to your router is not so simple:
# Port 64430 -> 10.0.0.1:443
config redirect
        option src 'wan'
        option proto 'tcp'
        option src_dport '64430'
        option dest_ip '10.0.0.1'
        option dest_port '443'
        option name 'Allow-HTTPS-router-redirect'

config rule
        option src 'wan'
        option proto 'tcp'
        option dest_port '443'
        option target 'ACCEPT'
        option name 'Allow-HTTPS-router-rule' 
Source:
http://www.smallbusinesstech.net/more-complicated-instructions/openwrt/setting-up-port-forwarding-and-dealing-with-loopbacks-on-openwrt-kamikaze-8.09.1

Monday, January 13, 2014

How To Split an Audio .flac file using Ubuntu Linux

How To Split an Audio .flac file using Ubuntu Linux:

"If you have big .flac audio file which include several CD tracks, sure you are interested to know how to split them and of course we are going to do it in Ubuntu Linux.
This method it use .cue files, which usually comes with the .flac ones.
First of all we need to install the following packages cuetools shntool flac. You can use Synaptic or this command in a terminal:
$ sudo apt-get install cuetools shntool flac
Now you can split the .flac audio file as follows:
$ cuebreakpoints file.cue | shnsplit -o flac file.flac
That's all.
Now a little bit of theory,
... shnsplit is the program used to split tracks, while cuebreakpoints it reads the break-points from file.cue and pipe them to shnsplit."

Thanks to Danilo Dellaquila .

Sunday, January 5, 2014

Sunday, December 8, 2013

Mikrotik RouterBOARD

Mikrotik (www.mikrotik.com) provides an interesting platform for creating a custom router/switch/wireless access point, the RouterBOARD.

The Mikrotik RouterBOARD RB493G includes the following:

  • Atheros AR7161 SOC with 256MB RAM
  • 9 port Gigabit switch
  • 3 mini-PCI slots. You can add a wifi N card and switch to AC later on.
  • 1 USB port, but it’s fairly non standard as explained in http://wiki.openwrt.org/toh/mikrotik/rb493g .
  • 1 microSD slot.

It can be bought for 130 € at LandaTel (LandaShop): http://landashop.com/catalog/mikrotik-routerboard-rb493g-gigabit-ethernet-p-1880.html

Sunday, December 1, 2013

Growing a ZFS pool

Growing a two disk mirror zpool by replacing disks is easy:

  1. Replace the first disk with a higher capacity disk (we're going from 2TB to 3TB disks): zpool replace -f pool ata-WDC_WD20EARS-00MVWB0_WD-xxxxxxxxxxxx ata-Hitachi_HDS5C3030BLE630_xxxxxxxxxxxx
  2. Wait for the resilver to complete (about 5h).
  3. Replace the second disk: zpool replace pool ata-ST2000DL003-xxxxxxxxxxxx ata-ST3000DM001-xxxxxxxxxxxx
  4. Wait for the resilver to complete again.
  5. Expand the pool by telling it to use the extra space: zpool online -e pool ata-Hitachi_HDS5C3030BLE630_xxxxxxxxxxxx
  6. Just in case, tell the pool to expand also the other disk: zpool online -e pool ata-ST3000DM001-xxxxxxxxxxxx
Thanks to the following links for describing the procedure:

Tuesday, November 5, 2013

Windows 7 BSOD while starting as a VM [Solved]

  • Create RDM disks:
#cd /vmfs/volumes/local/
#vmkfstools -z /vmfs/devices/disks/t10.ATA_____Samsung_SSD_840_Series__________________S14GNEBCB62239V____
_ rdm/Samsung_SSD_840_Series-S14GNEBCB62239V.vmdk -a lsisas
# vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST3640323AS_________________________________________5VK045H
3 rdm/ST3640323AS-5VK045H3.vmdk -a lsisas

Note: RDMs cannot be stores on a NFS datastore, see http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1001856 .


"If in doubt, turn on all possible required services e.g. set both intelide = 0/pciide = 0 and msahci = 0, or set all of these to 0 and it will still boot with the correct driver/s:
   aliide, amdide, atapi, cmdide, iastorv, intelide, msahci, pciide, viaide and LSI_SAS."


  • Start VM... no BSOD :)
  • Let Windows install and update drivers for virtual environment and reboot
  • Install VMware tools and reboot
  • VM is ready

Monday, October 28, 2013

Using ESX 5.1 NIC drivers on ESX 5.5

My ASUS M5A88-M EVO motherboard has a Realtek RTL8111E onboard NIC. I also have a D-Link 528T NIC on a PCI slot. Neither NIC is supported out of the box on ESXi 5.5 :(.

However, you can use the drivers that came with ESXi 5.1 on the current version (5.5). Check the following links for the procedure:

http://www.vladan.fr/realtek-8169-nics-not-detected-under-esxi-5-5/
http://www.bussink.ch/?p=1228
http://aubreykloppers.wordpress.com/2013/06/03/d-link-528t-on-esxi-55-1-procedure-and-driver/

Saturday, June 29, 2013

Encode FLAC audio to MP3

Low quality encoding:
128Kbps CBR + 2 channels + 44100Hz sampling frequency.
It should be good enough for listening on your car, on the bus with your smartphone and headphones, etc. avconv -i input.flac -ab 128k -ac 2 -ar 44100 output.mp3

High quality encoding:
 avconv -i input.flac -ab 196k -ac 2 -ar 48000 output.mp3

Sunday, May 12, 2013

AIRBET​​​​ Serveis aeronĂ utics​, S.L.

AIRBET es una empresa que engloba todos los servicios que puedan necesitar nuestros Clientes. Formamos pilotos, vendemos ultraligeros y autogiros. Mantenemos, reparamos todo tipo de aeronaves. las guardamos en nuestra base. Usted no debe preocuparse por nada, solo de VOLAR.
http://airbet1965.wix.com/airbet