[Fixed] Khmer font in Word on Mac

1. Install Khmer Unicode NiDA keyboard

Download and copy Khmer.keylayout to /Users/YourName/Library/Keyboard Layouts You may follow this guide

If you’re familiar with terminal, issue the following command to copy:

cp Where-You-Extra-To/Khmer.keylayout ~/Library/Keyboard\ Layouts/

Then, open “System Preferences“, search for “keyboard layouts“, click plus sign “+“, scroll down and select “Others“, you will see “NiDA Khmer“, select it and click “Add” and you’ve done!

2. Install more Khmer fonts

Download fonts here and extra it, then open “Font Bookwhere you can find by click on “Lauchpad” and search for “Font Book”, right click and choose “Add Fonts …” , browse to folder where you extracted your fonts to, select all, and click “Open” 

 

Note that some fonts will not display correctly, some of them I found work well are basically “Khmer OS …” font family. I would recommend you to select font before you start your typing 🙂

That’s it!!! Have fun!!! 🙂

Screen Shot 2018-01-03 at 3.11.51 PM

How to block using address-list in MikroTik

If you have multiple destination websites (addresses) you wish to block and you may want to add more addresses sometime in the future. It is a good idea to group those addresses into a list with a name that you can then block using that name. Time to time, you just need to add to the list without the need of writing a new blocking rules.

E.g. You want to block three websites e.g. a.com (122.3.2.1), b.com (100.1.2.3) and c.com (29.9.9.1). What you need to do is to issue: nslookup a.com … Or whatever way you do to get IP address of what websites (or anything?) you want to block. Then add the translated IP addresses into a list (let say name: BlockList). Finally, apply a firewall filter rule to block them with an action: reject or drop.

Here is how to do using command lines:

/ip firewall address-list add address=122.3.2.1 list=BlockList

/ip firewall address-list add address=100.1.2.3 list=BlockList

/ip firewall address-list add address=29.9.9.1 list=BlockList

/ip firewall filter add action=reject chain=forward dst-address-list=BlockList in-interface=lan out-interface=internet

… Later you can just add more address, last rule will automatically be applied. Note that you can also use this list to apply with other things like mangle…

How to install and access to your Raspberry Pi (Rasbian Lite version — No GUI)

Teamviewer on rasbian lite (no GUI)

  1. make sure you have TeamViewer account
  2. Download package: $ wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.tar.xz
  3. Extract package: $ tar -xvf teamviewer-host_armhf.tar.xz
  4. Install via dpkg tool: $ dpkg -i teamviewer-host_armhf.deb
  5. Run apt to fix: $ apt install -f (then you will ask to install a lot of dependencies, by issue ‘Y’)
  6. Run this command: $ teamviewer setup -> accept agreement -> login your credential (email) -> go to your
  7. email and add trusted devices -> you should get your TeamViewer ID for your raspberry box
  8. Create password for your device corresponding to your TeamViewer ID you get from the previous step: $ teamviewer –passwd YOUR_PASSWORD

===> Now you should be able to log in to your raspberry pi via teamviewer shown as SSH console.

 

Screen Shot 2017-12-07 at 4.40.20 PM

Sample image: Raspberry Pi from TeamViewer Apps with ‘htop’ running

 

How to install Webmin in Ubuntu

Here are a couple steps to get Webmin up and running on Ubuntu box:

  1. Make sure you log in as root, otherwise issue: sudo -s
  2. Add *.list file name webmin.list: nano /etc/apt/sources.list.d/webmin.list
    #add this lines
    deb http://download.webmin.com/download/repository sarge contrib
    deb http://download.webmin.com/download/repository sarge contrib
  3. Download key file: wget http://www.webmin.com/jcameron-key.asc
  4. Add key: apt-key add jcameron-key.asc
  5. Update package list: apt-get update
  6. Install package Webmin: apt-get install webmin
  7. Finally, you can now access to your Ubuntu box: https://Ubuntu-IP-Address:10000

Cheers!!!

How to backup and restore GPO Win 2k8 r2 using PowerShell commands

​###GPO
Import-Module GroupPolicy
Backup-Gpo -Name TestGPO -Path C:\GpoBackups -Comment "Weekly Backup"
Backup-Gpo -GUID fa4a9473-6e2a-4b87-ab78-175e68d97bde -Domain contoso.com -Server DC1 -Path \\Server1\GpoBackups
Backup-Gpo -All -Path \\Server1\GpoBackups

Restore-GPO -Name "TestGPO" -Path \\Server1\Backups
Restore-GPO -GUID fa4a9473-6e2a-4b87-ab78-175e68d97bde -Path \\Server1\Backups
Restore-GPO -All -Domain contoso.com -Path \\Server1\Backups

How To Troubleshoot Common HTTP Error Codes

Introduction

When accessing a web server or application, every HTTP request that is received by a server is responded to with an HTTP status code. HTTP status codes are three-digit codes, and are grouped into five different classes. The class of a status code can be quickly identified by its first digit:

  • 1xx: Informational
  • 2xx: Success
  • 3xx: Redirection
  • 4xx: Client Error
  • 5xx: Server Error

This guide focuses on identifying and troubleshooting the most commonly encountered HTTP error codes, i.e. 4xx and 5xx status codes, from a system administrator’s perspective. There are many situations that could cause a web server to respond to a request with a particular error code–we will cover common potential causes and solutions.

Client and Server Error Overview

Client errors, or HTTP status codes from 400 to 499, are the result of HTTP requests sent by a user client (i.e. a web browser or other HTTP client). Even though these types of errors are client-related, it is often useful to know which error code a user is encountering to determine if the potential issue can be fixed by server configuration.

Server errors, or HTTP status codes from 500 to 599, are returned by a web server when it is aware that an error has occurred or is otherwise not able to process the request.

General Troubleshooting Tips

  • When using a web browser to test a web server, refresh the browser after making server changes
  • Check server logs for more details about how the server is handling the requests. For example, web servers such as Apache or Nginx produce two files called access.log and error.log that can be scanned for relevant information
  • Keep in mind that HTTP status code definitions are part of a standard that is implemented by the application that is serving requests. This means that the actual status code that is returned depends on how the server software handles a particular error–this guide should generally point you in the right direction

Now that you have a high-level understanding of HTTP status codes, we will look at the commonly encountered errors.

400 Bad Request

The 400 status code, or Bad Request error, means the HTTP request that was sent to the server has invalid syntax.

Here are a few examples of when a 400 Bad Request error might occur:

  • The user’s cookie that is associated with the site is corrupt. Clearing the browser’s cache and cookies could solve this issue
  • Malformed request due to a faulty browser
  • Malformed request due to human error when manually forming HTTP requests (e.g. using curlincorrectly)

401 Unauthorized

The 401 status code, or an Unauthorized error, means that the user trying to access the resource has not been authenticated or has not been authenticated correctly. This means that the user must provide credentials to be able to view the protected resource.

An example scenario where a 401 Unauthorized error would be returned is if a user tries to access a resource that is protected by HTTP authentication, as in this Nginx tutorial. In this case, the user will receive a 401 response code until they provide a valid username and password (one that exists in the.htpasswd file) to the web server.

403 Forbidden

The 403 status code, or a Forbidden error, means that the user made a valid request but the server is refusing to serve the request, due to a lack of permission to access the requested resource. If you are encountering a 403 error unexpectedly, there are a few typical causes that are explained here.

File Permissions

403 errors commonly occur when the user that is running the web server process does not have sufficient permissions to read the file that is being accessed.

To give an example of troubleshooting a 403 error, assume the following situation:

  • The user is trying to access the web server’s index file, from http://example.com/index.html
  • The web server worker process is owned by the www-data user
  • On the server, the index file is located at /usr/share/nginx/html/index.html

If the user is getting a 403 Forbidden error, ensure that the www-data user has sufficient permissions to read the file. Typically, this means that the other permissions of the file should be set to read. There are several ways to ensure this, but the following command will work in this case:

sudo chmod o=r /usr/share/nginx/html/index.html 

.htaccess

Another potential cause of 403 errors, often intentinally, is the use of an .htaccess file. The .htaccessfile can be used to deny access of certain resources to specific IP addresses or ranges, for example.

If the user is unexpectedly getting a 403 Forbidden error, ensure that it is not being caused by your.htaccess settings.

Index File Does Not Exist

If the user is trying to access a directory that does not have a default index file, and directory listings are not enabled, the web server will return a 403 Forbidden error. For example, if the user is trying to accesshttp://example.com/emptydir/, and there is no index file in the emptydir directory on the server, a 403 status will be returned.

If you want directory listings to be enabled, you may do so in your web server configuration.

404 Not Found

The 404 status code, or a Not Found error, means that the user is able to communicate with the server but it is unable to locate the requested file or resource.

404 errors can occur in a large variety of situations. If the user is unexpectedly receiving a 404 Not Found error, here are some questions to ask while troubleshooting:

  • Does the link that directed the user to your server resource have a typographical error in it?
  • Did the user type in the wrong URL?
  • Does the file exist in the correct location on the server? Was the resource was moved or deleted on the server?
  • Does the server configuration have the correct document root location?
  • Does the user that owns the web server worker process have privileges to traverse to the directory that the requested file is in? (Hint: directories require read and execute permissions to be accessed)
  • Is the resource being accessed a symbolic link? If so, ensure the web server is configured to follow symbolic links

500 Internal Server Error

The 500 status code, or Internal Server Error, means that server cannot process the request for an unknown reason. Sometimes this code will appear when more specific 5xx errors are more appropriate.

This most common cause for this error is server misconfiguration (e.g. a malformed .htaccess file) or missing packages (e.g. trying to execute a PHP file without PHP installed properly).

502 Bad Gateway

The 502 status code, or Bad Gateway error, means that the server is a gateway or proxy server, and it is not receiving a valid response from the backend servers that should actually fulfill the request.

If the server in question is a reverse proxy server, such as a load balancer, here are a few things to ensure:

  • The backend servers (where the HTTP requests are being forwarded to) are healthy
  • The reverse proxy is configured properly, with the proper backends specified
  • The network connection between the backend servers and reverse proxy server is healthy. If the servers can communicate on other ports, make sure that the firewall is allowing the traffic between them

503 Service Unavailable

The 503 status code, or Service Unavailable error, means that the server is overloaded or under maintenance. This error implies that the service should become available at some point.

If the server is not under maintenance, this can indicate that the server does not have enough CPU or memory resources to handle all of the incoming requests, or that the web server needs to be configured to allow more users, threads, or processes.

504 Gateway Timeout

The 504 status code, or Gateway Timeout error, means that the server is a gateway or proxy server, and it is not receiving a response from the backend servers within the allowed time period.

This typically occurs in the following situations:

  • The network connection between the servers is poor
  • The backend server that is fulfilling the request is too slow, due to poor performance
  • The gateway or proxy server’s timeout duration is too short

Conclusion

Now that you are familiar with the most common HTTP error codes, and common solutions to those codes, you should have a good basis for troubleshooting issues with your web servers or applications.

If you encounter any error codes that were not mentioned in this guide, or if you know of other likely solutions to the ones that were described, feel free to discuss them in the comments!

Source: https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-http-error-codes

Configure DHCP Relay Agent

Extracted by Vichhaiy

 

Def: The DHCP Relay Agent component relays DHCP messages between DHCP clients and DHCP servers on different IP networks.

Note: You cannot use the DHCP Relay Agent component on a computer that is running the DHCP service, the network address translation (NAT) routing protocol component with automatic addressing enabled, or Internet Connection Sharing (ICS).

 

DHCP server with DHCP relay agent in windows 2012 server

If you have two different networks and you don’t want to install a DHCP Server on each side you can use “DHCP Relay Agent” Service.


Here a quick tutorial: 
1. DHCP-Server 
    Install “DHCP-Server” Role

2. Configure DHCP Scopes 
    Scope A 192.168.10.11-192.168.10.253 
    Scope B 192.168.11.11- 192.168.11.253

3. Router 
    Should have two Network cards. For each network one. 
    Network A IP: 192.168.10.254/24 
    Network B IP: 192.168.11.254/24

4. Install “Remote Access” Role

5. Run “Routing and Remote Access”

6. “Configure and Enable Routing and Remote Access”

7. Choose “Custom Configuration”

8. Choose “LAN routing” and start the service

9. Install the DHCP Relay Agent 
    Right Click on General in IPv4 and choose “New Routing Protocol” and there you can finally choose “DHCP Relay Agent”.

10. Right Click on” DHCP Relay Agent” and choose “Properties”. There you add your DHCP Server. In this case it would be 192.168.10.10.

11. Add the Network B Interface to the “DHCP Relay Agent”.

12. You should be done. In Windows 2008 it’s possible that you need to make adjustments to your Windows Firewall.

13. You can test on your client to get an IP Adress. Run from the command console: Ipconfig /release and Ipconfig /renew.  
    

After that you should be able to see the IP address if you type: ipconfig.

 

Ref:

http://patrick.eviltools.com/dhcp-server-with-dhcp-relay-agent-in-windows-2012-server/

http://technet.microsoft.com/en-us/library/dd469685.aspx