Anderson Alfaro



Enable json + gzip compression on iis

If you need to enable json compression with gzip module on IIS, the first thing we are going to do is: Run cmd.exe and  paste the folllowing command in dos console (Not in powershell): call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/serverRuntime /frequentHitThreshold:”1″ call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/urlCompression /doDynamicCompression:”True” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-“dynamicTypes.[mimeType=’application/json’]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+”dynamicTypes.[mimeType=’application/json’,enabled=’True’]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-“dynamicTypes.[mimeType=’application/json; charset=utf-8′]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+”dynamicTypes.[mimeType=’application/json; charset=utf-8′,enabled=’True’]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-“dynamicTypes.[mimeType=’application/javascript’]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+”dynamicTypes.[mimeType=’application/javascript’,enabled=’True’]” call %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-“dynamicTypes.[mimeType=’application/x-javascript’]”Read More

VMware Esxi firewall commands

Although this option allows you to put rules relatively easy, many times this rules are not applied if you dont know the default policy in esxi, so lets take a look some usefull commands to avoid putting rules that are not being effective.                                     LISTING ACTUAL RULES ~ # esxcli network firewall ruleset allowedip list GETTING THE FIREWALL STATUS ~ # esxcli network firewall get Default Action: PASS Enabled: false Loaded: false PUTTINGRead More

All OUs in this domain should be protected from accidental deletion

If all OUs in your Active Directory domains are not protected from accidental deletion, your Active Directory environment can experience disruptions that might be caused by accidental bulk deletion of objects. To avoid that here the instruction 1. Click Start, click Administrative Tools, right-click Active Directory Module for Windows PowerShell, and then click Run as administrator.                                 2. At the Active Directory module command prompt, type the following command to check with OUs are notRead More

GHOST: glibc: buffer overflow

A serious vulnerability was discovered, and was baptized GHOST in GNU/Linux. It’s present in all Red Hat Enterprise Linux versions, (CentOS etc.), and Debian systems. Affected versions: RHEL(Red Hat Enterprise Linux) version 6.x and 7.x CentOS Linux version 6.x & 7.x Ubuntu Linux version 10.04, 12.04 LTS Debian Linux version 7.x Linux Mint version 13.0 SUSE Linux Enterprise 11 and older (also OpenSuse Linux 11 or older versions). Arch Linux glibc version <= 2.18-1 It’s strongly recommended update glibc What services are using this library? Run this command to discoverRead More

Checking vSphere Flash Read Cache

Sometimes we need to check that everything is working fine with SSD. In order to check that, first connect to esxi via ssh ~ # esxcli storage vflash cache list vfc-1540989573-server.xxxxxxxx-000001 # esxcli storage vflash cache stats Usage: esxcli storage vflash cache stats {cmd} [cmd options] Available Commands: get                   Get vflash cache statistics. reset                 Reset vflash cache statistics.   In this case vfc-1540989573-server.xxxxxxxx-000001  is the virual machine id Now we’ll use: # esxcli storage vflash cache stats # esxcli storage vflash cache stats get Error: Missing required parameter -c|–cache-name Usage:Read More

esxcli Connect to localhost failed:

This issue may occur either because has lost the session between esxi with vCenter or because the password is not the same in vCenter Symptoms Esxcli is too slow, or receive this error …Connect to localhost failed: Cannot complete login due to an incorrect user name or password.   ~ # esxcli Connect to localhost failed: Cannot complete login due to an incorrect user name or password.     To resolve the issue: 1.Righ click and Disconnect the host from vCenter Server. (Do not remove it). 2.Righ click and reconnectingRead More

SSD not available for VMware vSphere Flash Read Cache

First, in order to detect Network Address Authority (naa) identifier of the SSD run de following commands: # esxcli storage nmp device list|less or # esxcfg-scsidevs -l | less or #esxcli storage core device list|less If you detect the following Is SSD: false <– Not recognized as SSD Run these commands: # esxcli storage nmp satp rule add –satp=VMW_SATP_LOCAL –device naa.600304801axxxx –option “enable_local enable_ssd” # esxcli storage core claimrule load # esxcli storage core claiming reclaim -d naa.XXXXXXX # esxcli storage core claimrule run And try again. IF YOU ALREADYRead More

Upgrading a virtual machine to the latest hardware version in VMware esxi

The previous step are: 1. Be sure you have the same build version in esxi host. If not, run a scan with Update Manager and update all important patches 2. Upgrade Vmware Tools, because might lose network settings if they are not on the latest version 2. Take a Snapshot before upgrade hardware version Start Vsphere Client or Vsphere Web and log in vCenter Server Client and perform a power off Right Click In the vSphere Client, the option is Upgrade Virtual Hardware. In the vSphere Web Client, the optionRead More

request entity is too large

If you  have this error, the page was not displayed because the request entity is too large or HTTPS 413: The page was not displayed because the request entity is too large. You can fix it running this command appcmd.exe set config -section:system.webserver/serverruntime/uploadreadaheadsize: 1048576 /commit:apphost   Other way to solve that: 1) Enter to IIS and select the site under Default Web Site 2) Select Configuration Editor 3) Within Section Dropdown, select “system.webServer/serverRuntime” 4) Enter a higher value for “uploadReadAheadSize” Default is very low something like 49152 bytes.