blocking hacker scanning your website using various type of extension that is not running on your webserver

April 10th, 2019

If you are running WordPress on Linux, most likely you won’t expect user hitting your website with .asp / .cfm / .jsp extension. When some hackers are trying to scan your site with all these non-sense requests, your webserver will be overloaded due to the 404 page is generated from wordpress.

To deal with this issue – we have written some re-write rules to tackle these requests before this is hitting onto the wordpress core.

RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{REQUEST_URI} !robots.txt$
RewriteCond %{REQUEST_URI} !wp-.*.php$ RewriteCond %{REQUEST_URI} !healthcheck.php$

RewriteRule .*\.(asp|aspx|ashx|asa|jsp|cfm|do|action|cer|exe|txt|htm|html|rar|zip|php)$ – [F,L,NC]

Remote Desktop Login Failed after recent windows update on the client

September 12th, 2018

Running into a problem with logging from Windows 7 to connect to a Windows 2008 SBS Server. This was due to the latest windows update KB4103712 in March 2018.

To fix this problem, you need to create the following registry on the windows 7 desktop

Registry path: HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters

Value: AllowEncryptionOracle (DWORD): 2

fpm-status and restart

April 17th, 2018

http://x.x.x.x/fpmstatus.php?full

systemctl restart php-fpm

Managing CentOS 7 firewall with firewall-cmd

March 6th, 2017

firewall-cmd --state

firewall-cmd --zone=public --permanent --add-port=2812/tcp
firewall-cmd --permanent --add-rich-rule 'rule family="ipv4" source address="x.x.x.x" log reject'

firewall-cmd --reload
firewall-cmd --list-all

Cleaning up WinSxs folder on Windows 2012 R2 or Windows 8.1

October 24th, 2016

To clean up windows component store (C:\Windows\WinSxS).

  1. Open up PowerShell
  2. To check if there is any component registry is corrupted. “dism /Online /Cleanup-Image /CheckHealth”
  3. If this returns error, try to do this to fix “dism /Online /Cleanup-Image /RestoreHealth” and Reboot your computer
  4. To check if windows component store can be cleaned up “dism.exe /online /Cleanup-Image /AnalyzeComponentStore”
  5. To remove all superseded version in the component store “dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase”
  6. To further clean up space, you can also remove all the backup components needed for deinstallation of the service pack “dism.exe /online /Cleanup-Image /SPSuperseded”

 

 

Too much Text on FB Ads ?

August 12th, 2016

You may use this tool to test:

https://www.facebook.com/ads/tools/text_overlay

Animated CC CreateJS Library on Google’s CDN

August 12th, 2016

When you upload an Animated CC ads to Google Adwords, you will need to use Google Hosted CreateJS library

https://support.google.com/richmedia/answer/6307288?hl=en

DoubleClick hosted URL

CreateJS
https://s0.2mdn.net/ads/studio/cached_libs/createjs_2015.11.26_54e1c3722102182bb133912ad4442e19_min.js

EaselJS
https://s0.2mdn.net/ads/studio/cached_libs/easeljs_0.8.2_937c3ec68021211c056f61c9ceaccffd_min.js

Movieclip
https://s0.2mdn.net/ads/studio/cached_libs/movieclip_0.8.1_927f07f1635e6a2a1aa76e79f9decf86_min.js

PreloadJS
https://s0.2mdn.net/ads/studio/cached_libs/preloadjs_0.6.2_d7b96570d4552592ae479162e546cb25_min.js

SoundJS
https://s0.2mdn.net/ads/studio/cached_libs/soundjs_0.6.2_4c1425ce52ff873d9fb7aa4daf23b94d_min.js

TweenJS
https://s0.2mdn.net/ads/studio/cached_libs/tweenjs_0.6.2_47653fa176057626486243bdc9dbf342_min.js

Also please be reminded to include the following MetaTag

<meta name=”ad.size” content=”width=300,height=250″>

 

Finally – before uploading, you may check your Ads here : AdWords HTML5 Validator

 

 

Estimate SSD lifetime on vmware

July 13th, 2016
  1. Obtain SSD Device id
    esxcli storage core device list
  2. Display Storage Statistics
    esxcli storage core device stats get -d=device_id

~ # esxcli storage core device stats get -d=t10.ATA_____KINGSTON_SUV400S37240G__________________50026B77650B37C4____
t10.ATA_____KINGSTON_SUV400S37240G__________________50026B77650B37C4____
Device: t10.ATA_____KINGSTON_SUV400S37240G__________________50026B77650B37C4____
Successful Commands: 21917
Blocks Read: 190610
Blocks Written: 84677
Read Operations: 7753
Write Operations: 12038
Reserve Operations: 694
Reservation Conflicts: 0
Failed Commands: 12041
Failed Blocks Read: 0
Failed Blocks Written: 0
Failed Read Operations: 0
Failed Write Operations: 0
Failed Reserve Operations: 0

mount NFS using CLI in VMWare ESXi

January 31st, 2016

#dismount

/sbin/esxcfg-nas -d ghetto

#mount

/sbin/esxcfg-nas -a ghetto -o 192.168.100.31 -s /ghetto

HP Procurve V1910 Advanced CLI

September 24th, 2014

There is a secret CLI for HP Procurve V1910 Switch.

  • Enable telnet / ssh from the web interface
  • ssh / telnet to the switch
  • type??_cmdline-mode on
  • When this asked for Password: type??512900