Sysadmins of the North (Page 12)

Technical SysOps blog, where topics include Sysadmin, DevOps, computers, servers, web, MySQL, database, virtualization, optimization and security

WMI/netsh to add DNS servers on network adapters

How to add DNS servers -or resolvers- to a Windows Server network adapter, or interface using WMI and the netsh command annd PowerShell. This one is quite old but may come in handy sometimes. In this example we use Google's Public DNS server addresses and localhost to add as DNS Servers on our server's interfaces.

Read more...

DHCP on Windows Server 2012 using 169.254.xx.xx as server name

After installing a new Windows Server 2012 R2 machine with the DHCP role enabled, adding a DHCP server used a 169.254.x.x IP address as server name. Instead of the servers hostname

Explicit Congestion Notification (ECN) slows down outbound connections

ECN is an optional feature that may be used between two ECN-enabled endpoints when the underlying network infrastructure also supports it. Unfortunately, having one ECN Capability enabled endpoint may slow down outbound network connections to outdated network equipment.

"A domain rename operation is already in progress"

The other day, when I attempted to add a newly installed Active Directory to become the slave domain controller of a master, the error message "A domain rename operation is already in progress" was displayed. Promoting the Windows Server 2012 R2 server to a Domain Controller failed.

Joomla websites abused as open proxy for Denial-of-Service attacks

Joomla websites using the Googlemaps plugin for Joomla are actively abused as open proxy for launching Denial-of-Service (DoS) attacks. Even though the Googlemaps plugin vulnerability plugin_googlemap2_proxy.php was released over one and a half (1,5) years ago, I still see these DoS-attacks happening on a regular basis...

Read more...

Convert decimal to hex in Bash?

A quicky for my archives, learn how to convert decimal to hex and hexadecimal to decimal, in Bash...

Sysadmins of the North goes global!

How to set up a global Geolocation DNS load balancing Varnish Cache Content Delivery Network with Bind9, geo-ip database, Varnish Cache and DigtalOcean. DIY High-Availability for your website!

How to set a good PHP realpath_cache_size

Learn how to optimize PHP performance by checking and setting PHP realpath_cache_size

Redirect old URL to new URL or send 404 page with PHP

If you've moved some old PHP pages, or URLs, to new pages and URLs, you can use the following PHP code snippet to easily redirect all visitors and incoming requests to the new location. This PHP code snippet uses a 301 Moved Permanently redirect, perfect for SEO and returns a 404 Not Found if a new location hasn't been set up yet.

Display commas in WordPress tags

How to use a tag with a comma in it in WordPress? Normally, in WordPress all tags are comma seperated: php, wordpress, website, functions.php. But what if you need to use a tag with commas in it? For instance "cafe, bar, restaurants". Easy, create a filter in your WordPress functions.php, and here is how...

How to string replace on all WordPress posts in MySQL

Learn how to mysql replace content in your MySQL database in bulk with MySQL REPLACE. Sometimes it's useful to know how to bulk edit content in your WordPress MySQL database using MySQL replace() function.

Conditionally start Application Pools on remote IIS web servers

In this article you'll learn how to start all stopped application pools that have the ApplicationPool.AutoStart property set to $True using AppCmd.exe or PowerShell. This is something you often or occasionally have to perform on various servers, for example when an application pool hangs.

Check website availability with PHP and cURL

Here you'll find a PHP script to check if your website is up and online available. It uses PHP and cURL. This script comes in handy because website uptime and availability is important, and you want your website to be always online available. If your website is down, it'll send you an email to notify you about downtime.

Read more...

Custom PHP version on IIS Express and WebMatrix 3

PHP 7 with OPcache in IIS Express for Microsoft WebMatrix 3, learn how to create your own PHP development environment easily with Microsoft WebMatrix and IIS Express and your own custom PHP version.

Increase in SQL injection attacks

Since a week or so, I notice a huge increase in SQL injection attacks on various websites. Anyone else seeing the same SQL injection attacks lately? This increased SQL injection activity - on various web sites and databases - has the following characteristics