13 December 2017

Veeam Backup 9.5 :& Restore Linux Files

This week I had to restore some files on a (Turnkey) Linux Virtual Machine (VM) on VMware.

The backup of the VM is done with Veeam Backup & Replication 9.5

During the restore, Veeam creates a temporary VM, boots it up and then you can selectively restore files to the destination machine.

VeeamBackup 9.5 - Restore Linux Files

Veeam uses ports 2500-5000 so I needed to open these ports on the firewall on the destination machine.

nmap nor netstat -tulpn helped me to see whether these ports were open or closed. Maybe I used the wrong parameters ...

We use the Linux Firewall "iptables", so I needed to add INPUT chains.

iptables config for VeeamBackup:


cat /etc/network/if-pre-up.d/iptables  start this script to reload the firewall <<<<<<<<
  
    #!/bin/sh  
    /sbin/iptables-restore < /etc/iptables.up.rules  

chmod +x /etc/network/if-pre-up.d/iptables

Edit file /etc/iptables.up.rules and add

# Needed for VeemBackup  FLR restore files to linux  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2500:5000 -s xxx.xxx.xxx.xxx -j ACCEPT
# To be sure I added some other hosts which might be involved in the restore process  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2500:5000 -s 192.168.yyy.yyy -j ACCEPT  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2500:5000 -s 192.168.zzz.zzz -j ACCEPT  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2500:5000 -s 192.168.www.www -j ACCEPT  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 2500:5000 -s 192.168.uuu.uuu -j ACCEPT  


and reload the firewall:
/etc/network/if-pre-up.d/iptables
After making these changes, the restore worked !


see also:
https://helpcenter.veeam.com/docs/backup/vsphere/used_ports.html?ver=95#linux_servers
https://community.spiceworks.com/how_to/103485-configuring-a-veeam-linux-backup-repository

23 September 2017

Map network drive at startup



Update 03-2021: 
Some time ago TransIP stopped this free service ....

I use free storage at https://www.transip.nl/stack/ and can access it via webdav.

And even nicer : I can map a network drive to this storage.

Here is a simple bat script I use to map the network drive.
It made it run at startup to be sure it is always available.
I added some delay to give the computer enough time to process every command.

C:\bat\MapZ-Stack.bat

@echo off
timeout /t 15
if exist z:\nul net use z: /del
timeout /t 5
echo Create Z:-disc for StackStorage
net use z: https://YourAccount.stackstorage.com/remote.php/webdav/ YourPassword /user:YourAccount

Replace YourAccount en YourPassword with the proper values you got from Transip

Run a batch file at boot in Windows 8 and 10 users
(copied from https://www.computerhope.com/issues/ch000322.htm)


  • Create a shortcut to the batch file.
  • Once the shortcut has been created, right-click the file and select Cut.
  • Press the Start button and type Run and press enter.
  • In the Run window, type shell:startup to open the Startup folder.
  • Once the Startup folder has been opened, click the Home tab at the top of the folder and select Paste to paste the shortcut into the folder.
So, now I have the Z:-drive everytime I login.


16 September 2017

How to find Microsoft Office license keys

Als je Office 2010 of ouder hebt en een schone installatie van Windows 10 wilt uitvoeren, zoek dan eerst je Office-productcode. Tips voor het vinden van je productcode vind je in De productcode voor Office 2010 zoeken of De productcode voor je Office 2007-programma invoeren.

https://products.office.com/2010-microsoft-office-suites-license-designations

https://support.office.com/article/Enter-the-product-key-for-your-Office-2007-program-fabe03d9-fbc3-452e-8fd4-d1c2e661d518

see also
http://www.belarc.com/info_ms_product_keys


How to Change Microsoft Windows and Office Product Keys

Sometimes a Microsoft product key shown in Belarc software doesn't match the key on the Microsoft sticker, or only shows a few characters of the key.  One common cause of this is that the software was pre-installed by the computer manufacturer and your personal product key was sent on a separate card or sticker.  Computer manufacturers often use their product key, instead of yours, when pre-installing software at the factory so that's the key you're seeing. 
Another common cause is that recent Office installers remove all but the last five characters of the install product key once the installation completes.
To change the product key currently on your computer (and reported by Belarc) to your full personal key, you can follow the steps outlined below.

Windows product keys

You can change your Windows product key by following the instructions at this Change Product Key Microsoft web page.  Those instructions work on many versions of Windows.

Finding your Office 2013 and later product key

Purchasers of Office 2013 and later usually receive only a Product Key Card and instructions to download office from the office.com web site.  The 25 character key on that Product Key Card is not your office install key, but instead an entitlement key allowing you to install office from that web site.
You can see the product key that is used to install office by signing into your office.com account here.  Once signed in, choose Install from a disc under Account Options.  You'll see your office installation product key to the right of your options.

Changing your Office 2010 and later product keys

You can change your Office 2010 and 2013 Professional Plus or later product key like this
  1. Open the Windows Control Panel and run "Uninstall a program" in the Programs group. (On Windows XP, just run the Add or Remove Programs control panel.)  You'll find the Control Panel on the Start menu or on Windows 8 by searching for it with the Search charm.
  2. Find and select the Office product you'd like to change the product key for in the list of programs.  Then click Change.
  3. In the resulting dialog box select the "Enter a Product Key" option and click Continue.
  4. Type your product key and select the option "Attempt to automatically activate my product online".  Then click Continue and on the next screen click Install Now.
Note: You must have an internet connection to reactivate Office online. However, you can also activate Office at a later time by opening any Office app, clicking on the File tab, and selecting Help.

Changing your Office 2007 and earlier product keys

You can change your Office 2007 (or older version) product key by following the instructions at the How to change the product key for Office XP, for Office 2003, and for the 2007 Office system Microsoft web page. 

16 January 2017

Website gehost bij Antagonist.nl : https configureren met gratis SSL certificaat van ZeroSSL [Updated 1/6/2017]

Waarom https i.p.v. http gebruiken?

  • veiligheid: alle verkeer van en naar je website wordt geëncrypteerd
  • vertrouwen: bezoekers weten zeker dat ze op jouw website zitten; In de URL staat een gesloten slotje; in Chrome is dit slotje groen gekleurd
  • Het helpt je ranking bij Google
  • Vertrouwelijkheid, Authenticiteit, Integriteit
Opdat je site https zou kunnen gebruiken, heb je een SSL certificaat nodig. Zo'n certificaat kost normaal gezien geld (vanaf 8 euro/jaar ), maar het kan ook gratis al moet je dan wel elke 3 maanden het certificaat vernieuwen.

De procedure om een WordPress website gehost bij antagonist.nl te voorzien van een gratis SSL certificaat zodat https kan gebruikt worden,  wordt hieronder beschreven:

[Update 1/6/2017] Antagonist.nl voorziet voortaan zelf de gratis certificaten zodat onderstaande procedure niet meer moet uitgevoerd worden.

Gratis SSL certificaat aanvragen bij ZeroSSL.com

  1. Surf naar http://zerossl.com
  2. Online tools > Start
  3. Vul bij domains: [jouwDomainNaam.xxx] in en accepteer onderaan de 2 voorwaarden.
  4. Klik op Next en Yes (include www-prefixed version too?) zodat ook www.jouwDomainNaam.xxx  in https mode kan gebruikt worden
  5. Er wordt nu een CSR gegenereerd 
  6. Download de CSR
  7. Klik op Next. Er wordt een account key gegenereerd
  8. Download de account key (= RSA PRIVATE KEY)
  9. Klik op Next
  10. Volg de instructies voor de verification. Je moet 2 files aanmaken en op de site plaatsen:
    • Verification
      Je bewijzen dat je toegang hebt tot de webserver waarvoor je het SSL certificaat aanvraagt.
      Daarom moet je een file met een lange filename en met de Text als inhoud uploaden (via ftp) in .well-known/acme-challenge/ folder
      Let op dat de filename GEEN extensie (bv: .txt) bevat !
      En upload file via ftp in
      /domains/[jouwDomainNaam.xxx]/public_html/.well-known/acme-challenge/
      (vergeet het puntje niet voor well-known)
      Voorbeeld van zo'n filename:
      O1zoMcIK1t9j4CdOP1K-q6jljeUJ_ufbhs0MGiFz5AE
      Inhoud van die file: O1zoMcIK1t9j4CdOP1K-q6jljeUJ_ufbhs0MGiFz5AE.8uULhAGr4bCmGiLXjmaeFdudtbUmv9UvP_AzJ9hDBUsJe kan daarna te testen of de link bereikbaar is door erop te klikken http://[jouwDomainNaam.xxx]/.well-known/acme-challenge/O1zoMcIK1t9j4CdOP1K-q6jljeUJ_ufbhs0MGiFz5AE
  11. Klik op Next
  12. Op deze pagina krijg je het certificate (=public key) te zien. Download die files ook
    1. Tip:Print die pagina als pdf  
      Klik op “Download” om het certificaat te downloaden > domain-crt.txt
  13. Copy en paste de private key (RSA) en public key via (eerst inloggen op je DirectAdmin account bij antagonist.nl) DirectAdmin > Home !!!! > SSL Certificates
      • Copieer private key (RSA) en public key (certificate)  in dezelfde textarea als “Paste a pre-generated certificate and key” . Let op: er mogen geen lege lijnen in de textarea voorkomen.
      1. In de tekst area staat nu iets in de zin van:
        ----BEGIN RSA PRIVATE KEY-----
        MIIJKgIBAAKCAgEAilWecOgQNt42MqkZljyPmuv8FENQBK1i76YaYnfihFSXbnmh
        ...
        -----END RSA PRIVATE KEY-----
        -----BEGIN CERTIFICATE-----
        MIIGGjCCBQKgAwIBAgISAzPpG9pskoG46sUoOAGxqD4kMA0GCSqGSIb3DQEBCwUA
        ...
        -----END CERTIFICATE-----
        -----BEGIN CERTIFICATE-----
        MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
        ...
        -----END CERTIFICATE-----
      2.  klik op Save

    Bezoekers automatisch doorsturen via HTTPS

    Makkelijkst is om alle http traffiek automatisch te redirecten naar https.
    Wijzig public_html/.htaccess op je website: voeg volgende rewrite rule bovenaan toe:

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


    Oplossing voor mixed content - Wordpress plugin SSL Insecure Content Fixer

    Als je Wordpress gebruikt worden alle links vast gecodeerd als http://[jouwDomainNaam.xxx]/..
    Daardoor zal je pagina als mixed content worden beschouwd en niet beveiligd zijn.
    Gelukkig bestaat er een plugin die dit oplost zodat je niet alle htmlcode moet aanpassen:
    SSL Insecure Content Fixer.

    Installeer Wordpress plugin SSL Insecure Content Fixer



    1. Ga naar je Wordpress dashboard en kies Plugins.
    2. Zoek plugin SSL Insecure Content Fixer, installeer en activeer die plugin.
    3. Bij instellingen van de plugin kies je:
    4. Instellingen > SSL Insecure Content Fixer Settings
    5. [x] Content (zodat de http:// voor images vervangen wordt door https://)

    Voilà, voortaan wordt [youwDomainNaam.xxx] automatisch via https afgehandeld.

    P.S. Vergeet niet het gratis SSL certficaat elke 3 maanden te vernieuwen !