Tuesday, July 29, 2014

วันนี้ทดสอบติดตั้ง pfSense Ver.2.1.4 LoadBalance 2 Wan

ทดสอบอย่างแรกติดตั้ง pfSense ตามเวปนี้ http://sysadmin.psu.ac.th/2013/10/04/how-to-install-pfsense-2-1-by-newbies/
 หลังจากติดตั้งเรียบร้อย


 หน้าตาพร้อมใช้งาน
ต่อไป Config เพื่อทำ LoadBalance  2 Wan โดยไปที่ System ---> Routing
แล้วไปที่ Group


สร้างรูปแบบตามนี้  Tire1 สร้างให้เหมือนกันเพื่อเป็น LoadBalance แล้ว Save

หลังจาก Save ต่อไปก็ไปสร้าง Rules โดยไปที่ Firewall --> Rules แล้วไปคลิกทึ่ LAN
เพิ่มโดยการคลิก + แล้วเลื่อนลงไปล่างๆ คลิกที่ Gateway -->Advance แล้วเลือก เป็นชื่อ Group ที่ได้สร้างไว้ แล้วก็ Save


ก็จะสามารถใช้งานเป็น LoadBalance ได้
ต่อไปก็จะทำ Forword Ports เพื่อลองทดสอบกับโปรแกรม uTorrents
ไปที่ Firewall --> Aliases แล้วก็ IP  กดเครื่องหมาย + เพื่อเพิ่ม IP ที่จะ Forword Port

แล้วก็ไปที่ Ports



แล้วไปที่  Forewall --> NAT แล้วคลิกที่เครื่องหมาย + เพื่อทำ Port Forward

ใส่รายละเอียดตามนี้  โดยใช่เป็นชื่อแทน ตามหน้า Aliases แต่ต้องแก้ที่ Interface เป็น WAN1 และ WAN2 ก็ใส่ตามนี้เหมือนกัน


ตอนนี้ก็ลองเทสโหลดบิตเช็คดูว่า ออก 2 WAN จริงไหม เพียงเท่านี้ก็สามารถใช้งานได้
LoadBalance 2 WAN ใช้งานได้แล้วครับ



Thursday, July 3, 2014

วิธีแก้ไฟล์รูปที่ไม่แสดงตัวอย่างรูป ต้องคลิ๊กเข้าไปดู

ไฟล์รูปต่าง ๆ ที่อยู่ในหน้าต่าง explorer  จะแสดงรูปให้เห็นโดยไม่ต้องคลิ๊กเข้าไปดูสามารถปรับขนาดและรายละเอียดได้ตามต้องการ  แต่อยู่ดี ๆ มันกลับไม่แสดงรูป ต้องคลิ๊กเข้าไปดูตลอด(preview) ถึงจะเห็น อาการแบบนี้ไม่ต้องตกใจครับ..บอกได้คำเดียวว่า.”เส้นผมบังภูเขา” เรามีวิธีแก้ไขแบบชนิดที่ว่าอ๋อ ง่ายแค่นี้หนะ.. Great Idea
1) ให้ไปที่โฟลเดอร์ที่รูปภาพของคุณครับ หรือเปิดโฟลเดอร์ไหนก็ได้ที่มีรูปอยู่เพื่อเราจะได้ดูว่ามันแสดงหรือยัง
show-preview1

2) กดปุ่ม Alt บนแป้นพิมพ์ จะได้เมนูบาร์ปรากฏขึ้นมาที่ช่วงบนของหน้าต่าง แล้วให้คุณกดปุ่มอักษร t แล้วตามด้วยปุ่มอักษร O เพื่อเปิดหน้าต่าง Folder Optionsshow-preview23) คลิกที่แท็บที่ชื่อ View แล้วในช่องตรงช่วงกลางหน้าต่าง Files and Folder รายการแรกจะเป็นAlways show icons, never thumbnails ซึ่งข้างหน้ารายการดังกล่าวจะเป็นสี่เหลี่ยมเล็กๆ และน่าจะมีเครื่องหมายถูกใส่อยู่ ให้คุณคลิกเอาเครื่่องหมายถูกออกไป  จากนั้นคลิกที่ปุ่ม OKshow-preview3
แค่นี้ก็แสดงรูปตัวอย่างที่เราต้องการได้แล้ว
Well Done


สรุป1. ไปที่ Tools->Folder Option
2. ใน tab “View” ตรง Files and Folder
3. ให้ยกเลิกเครื่องหมายถูกออก ที่ Always show icons, never thumbnails  แล้ว กด OK
เครดิต : http://www.kiwaram.net/windows-7-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%82%E0%B8%8A%E0%B8%A7%E0%B9%8C%E0%B8%A3%E0%B8%B9%E0%B8%9B%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87/

How to configure IP address from Cisco CLI: Assigning an IP Address to CISCO Aironet 2600

1. Connect the PC's serial port to the AP via the CLI interface cable. Run a terminal
program set to 9600 baud.
2. At the prompt, type enable.
3. Type the password (default password is Cisco).
4. Type the command configure terminal.
5. Type the command interface BVI1.
6. Enter the IP address. Type ip address <ip address> <net mask>.
7. Enter the default gateway address. Type default-gateway <ip address>
8. Type end and then type write mem to save configuration.
The rest of the configuration can easily be done through the browser interface. Log into the AP via a web browser using the IP address assigned in the above step.

:http://intermec.custhelp.com/app/answers/detail/a_id/10590/~/how-to-configure-ip-address-from-cisco-cli%3A-assigning-an-ip-address-to-1242ag

Sunday, June 29, 2014

วิธีการเพิ่ม Hyper Terminal ใน Windows 7 32&64 Bit

โปรแกรม HyperTerminal และไฟล์อื่นๆ ที่เกี่ยวข้อง (จาก Windows XP) ดาว์นโหลดได้ ที่นี่
เครื่องคอมพิวเตอร์ที่ติดตั้ง ระบบปฏิบัติการ Windows 7
ขั้นตอน

ดาว์นโหลดไฟล์โปรแกรมด้านบน แล้วทำการแตกไฟล์ (จะได้ โฟล์เดอร์ hypertrm พร้อม 3 ไฟล์ด้านใน
สำหรับ Windows 7 (32bit) ให้สร้างโฟล์เดอร์ HyperTerminal ตามนี้ C:\Program Files\HyperTerminal
ส่วน Windows 7 (64bit) ให้สร้างโฟล์เดอร์ HyperTerminal ตามนี้ C:\Program Files (x86)\HyperTerminal
copy ไฟล์ hypertrm.exe ที่ได้จาก ข้อที่ 1 ไปวางในโฟลเดอร์ที่ได้สร้างไว้แล้วใน ข้อที่ 2
copy ไฟล์ hypertrm.hlp ที่ได้จาก ข้อที่ 1 เช่นกัน ไปวางในโฟลเดอร์ Help ตามนี้ C:\Windows\Help
copy ไฟล์ hypertrm.dll ที่ได้จาก ข้อที่ 1 อีกเช่นกัน ไปวางในโฟลเดอร์ System ตามนี้ C:\Windows\system
ให้ทำการสร้าง short cut ชี้ไปที่ไฟล์ hypertrm.exe ที่อยู่ในโฟล์เดอร์ ตามข้อที่ 2
เสร็จขั้นตอน

เพียงเท่านี้เราก็มีโปรแกรม HyperTerminal ใช้ใน Windows 7 กันแล้ว

ปล.

หากเปิดโปรแกรมขึ้นมาแล้วเครื่องฟ้องว่า ไฟล์ hypertrm.dll หาย หรือหาไม่เจอ ให้ลองเปลี่ยนตำแหน่งไฟล์ ใน ข้อที่ 5 ไปที่ C:\Windows\system32

เครดิต : http://lumos.yiu.ac.th/

Friday, June 13, 2014

Group Policy ทำ Desktop ให้เหมือนกันโดย AD

Using Group Policy to configure Desktop Wallpaper (“Background”)

Group Policy is of course one of the best ways you can lockdown and configure your windows systems in your environment and one of the most commonly configured setting in Group Policy is the ability to configured the Desktop Wallpaper (a.k.a. Background) image. Now most of you might just say is all you need to do is set the  group policy setting however there are some common traps that you might fall into if you don’t use this setting correctly.

Method #1: Administrative Template “Desktop Wallpaper” Setting

The “Desktop Wallpaper” method is of course the most commonly used way for configuring the Wallpaper on a computer however as it seems with all things Group Policy using this setting comes with its own pro’s and con’s.
Pro’s
  • Change is Restricted for the users
  • Works on all versions of Windows
Con’s
  • Limited targeting only based on standard Group Policy Object’s (OU,Security Filter,Site,WMI & Domain)
This setting can be found under User Configuration > Administrative Templates > Desktop > Desktop and is straight forward to configure as all you have to do is specify the explicit local path or a UNC to the image you want displayed as the desktop wallpaper (see below).
image
Behind the scenes all this setting is doing is configuring the REG_SZ “Wallpaper” and the REG_SZ “WallpaperStyle”  registry keys under the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System  path.
TIP #1: If you are running Windows 7/Server 2008 R2 pre-Service Pack 1 you will need to install hotfixhttp://support.microsoft.com/kb/977944 for this setting to work.
TIP #2: If you are configuring this setting I recommend that you use the “Fill” Wallpaper Style as this will work best with most screen resolutions (especially on Windows 7).
TIP #3: If you configure this setting you will need to wait for the user to logoff the computer before the background is updated.

Method #2: Group Policy Preferences Registry Key Wallpaper Configuration
As I mention in Method #1 all the Administrative Template “Desktop Wallpaper” does is configure the HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System REG_SZ “Wallpaper” key. Therefore you can also use the Group Policy Preference Registry Extension option to also set the same key to give you some added benefits.
Pro’s
Con’s
  • Must run Windows XP (or greater)
  • Must have the Group Policy Client Side Extensions installed.
To configured the Desktop Wallpaper the same as the “Desktop Wallpaper” administrative template simply create two registry keys User Configuration > Preferences > Windows Settings > Registry (see below). Now depending on the registry key that you configure for this setting you can either have this as a restricted (a.k.a. locked) setting or an unrestricted setting that allows the users to make their own changes.
Restricted: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\Wallpaper
Unrestricted: HKCU\Control Panel\Desktop\Wallpaper
image
Restricted: HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\WallpaperStyle
Unrestricted: HKCU\Control Panel\Desktop\WallpaperStyle
image
Tip #4: If you don’t configured the “WallpaperStyle” registry key then users will still be able to choose their own Wallpaper Style.
If you chose the restricted registry keys to configured the wallpaper then ensure you also select the “Replace” action and “Remove this item when it is no longer applied” common option is selected (see below). If you don’t do this you will find that your users will not be able to change their wallpaper even after the policy is removed as the policy registry key will not be removed.
image
image
If you chose to use the unrestricted registry key values then also make sure you chose the “Apply once and do not reapply” option. If you don’t do this the users wallpaper will be reset ever time they log off their computer as the key will be set back to the original value during each policy refresh.
image

Configuring the Desktop Wallpaper Storage Location

Now that you know the many options for configuring the Desktop Wallpaper via Group Policy the next thing you should consider is where is the wallpaper being stored. As you can seen in the screen shots of the administrative template Desktop Wallpaper that they use the example of a UNC path. But…
image
TIP #5: DONT EVER USE A UNC PATH FOR A DESKTOP WALLPAPER… EVER!!
Simple put using a UNC path puts a lot of stress on network as it has to download file every time the wallpaper is loaded. It also means that if the network path cannot be contacted when the user logs on all they will get is a black background wallpaper. This is particularly obvious when someone logs on with a laptop not connected LAN.
So the obviously question is how do you make sure that file that the desktop wallpaper uses is always available and easily accessible? Use a script and copy the file to the local hard drive. Sure… buthttp://ihatelogonscripts.com and the issue with using a script is that it will only run when the computer starts up or when the user logs on. Generally this would not be a problem and if you are smart enough to use a copy program like robocopy or other such program it wont stress your LAN as it will only copy the file once. But on the day that you change the desktop wallpaper ever computer and/or user will try to download the new wallpaper all at once.
The Answer? Use Group Policy Preferences File Extension and copy the file down to the local computer.

Using the Group Policy Preferences File Extension

Using the File Extension to copy the file to the local hard drive means the file will be copied to the local hard drive making obviously available at all times. However the File Extensions options also has the advantage of being able to updated the file during each group policy refresh. This way the computer gets the updated wallpaper without having to logoff or reboot the computer and you avoid slamming the network in the morning when all the computers turn on.
image
TIP #6: Setup the file copy as a computer setting so that it will update the files even when there is no user logged on.
TIP #7: If you follow Tip #6 then you need to make sure that the desktop wallpaper file has got “Domain Computers” Read permissions so the local system account has access to copy the file from the network.
So by now, hopefully you know how to set the desktop wallpaper and so you can ensure that the images you use for the wallpaper are always available that way you  can ensure that your users are always subjected to your corporate desktop wallpaper.
เครดิต : http://www.grouppolicy.biz/2011/03/best-practice-using-group-policy-to-configure-desktop-wallpaper-background/

วิธีแก้ User Profile ล็อกอินเข้าแต่ Temp file

เจออาการแบบนี้กับ windows 7 ปัญหา The User Profile Service failed the logon หรือที่มันบอกว่า โปรไฟล์ผู้ใช้บริการไม่สามารถเข้าสู่ระบบ  หรือ logon ไม่ได้ ไฟต์มันอาจจะเสีย นะคับ
คอมที่ผมเจอมันเป็น วิสต้า แต่คิดว่าปัญหานี้น่าจะแก้พวก win Xp -7 ได้เหมือนกัน
อาการที่สังเกตได้ พอมันบูต เข้าวินโดว์ มันจะขึ้นว่า “The user profile service failed the logon user profile cannot be loaded”
1.เราก็สั่ง รีสตาร์เครื่อง  กด F8 เข้า  Safe Mode นะคับ เลือก ตัวuser ที่เป็น Administrator นะคับ
2.คลิก start \search\  พิมพ์ regedit
3.เลือก HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList นะคับ

จากรูป ลบไฟล์   S-1-5..... folder ที่ไม่มี นามสกุล . Bak ทิ้งไปนะคับ คังรูป

4.จากนั้น หาไฟต์ ที่มีนามสกุล .bak  ดูที่จากข้างขวานะคับ 

เลือกที่ refcount   คลิกเซต์ค่า จากรูปนะคับ

จากนั้น หาตัว State แล้วแก้ไขดังรูป

5. ปลี่ยนนามสกุล ไฟล์ S-1-5....เอาออกไม่มีนามสกุล .bak นะคับ
6.ปิด regedit. คับ
7. Restart เครื่องใหม่ แล้ว logon ใหม่นะคับ 


ที่มา : http://www.thaiadmin.org/board/index.php?topic=140044.0

Tuesday, June 10, 2014

การจัดการ Disk ของ Esxi ทั้งสามแบบ

ดิสก์เสมือน หรือไฟล์ .VMDK ที่เราคุ้นเคยกันก็จะมีอย่างบาง (Thin) และอย่างหนา (Thick) แต่ในความเป็นจริง ดิสก์เสมือนแตกออกได้เป็น 3 แบบ คือ
  1. Thin…. ดิสก์เสมือนแบบบาง
  2. Zeroed Thick…. ดิสก์เสมือนแบบหนา เขียนศูนย์ทีหลัง
  3. Eager zeroed thick…. ดิสก์เสมือนแบบหนา เขียนศูนย์เลย
ก่อนจะไปดูว่าทั้ง 3 แบบต่างกันอย่างไร ขออธิบายเรื่องการ “เขียนศูนย์ (Zeroing)” กันก่อน ในการใช้งาน ESX/ESXi เมื่อเราสร้างดิสก์เสมือนให้แก่จักรกลเสมือน โฮสต์จะมีกระบวนการในการเขียนเลขศูนย์ลงไปทุกๆ บล็อค (Block) เพื่อให้มั่นใจได้ว่าข้อมูลเก่าที่ค้างอยู่จะถูกล้างทิ้งไป การเขียนศูนย์ลงไปจะทำได้ใน 2 ช่วงเวลา คือเวลาที่เราสร้าง (create-time) ดิสก์เสมือน หรือเวลาที่เราจะใช้บล็อคนั้นเป็นครั้งแรก (run-time)
Thin เราคุ้นเคยกับดิสก์เสมือนแบบบางนี้มาช่วงหนึ่งแล้ว กล่าวคือหากเราต้องการพื้นที่ 100 กิกกะไบต์ แต่ใช้จริง 20 กิกกะไบต์ พื้นที่ที่สูญเสียไปบนสตอเรจก็จะแค่ 20 กิกกะไบต์เท่าที่ใช้จริง เพียงแต่โฮสต์จะทำการหลอกระบบปฏิบัติการเกสต์ด้านในว่าคุณมีอยู่ 100 กิกกะไบต์นะ การเลือกใช้ดิสก์เสมือนแบบบางช่วยให้เราใช้งานพื้นที่สตอเรจได้คุ้มค่ายิ่งขึ้น แต่ประสิทธิภาพจะด้อยกว่าวิธีอื่นเมื่อเราต้องการเขียนลงบนพื้นที่ใหม่หรือบล็อคใหม่ โฮสต์ต้องเสียเวลาในการควานหาว่าบล็อคไหนว่าง แล้วเขียนศูนย์ลงไปเพื่อล้างข้อมูลเก่า (run-time) จากนั้นก็ค่อยเขียนข้อมูลที่ต้องการเก็บลงไป…. ข้อดีคือสร้างดิสก์เสมือนขึ้นมาได้เร็ว และใช้งานพื้นที่ได้คุ้มค่า
Zeroed Thick ตัวนี้จะเป็นค่าตั้งต้นสำหรับดิสก์เสมือนแบบหนา เมื่อเราสร้างมันขึ้นมาในครั้งแรกโฮสต์จะจองพื้นที่ตามที่เราต้องการ เช่น เราต้องการ 100 กิกกะไบต์ ระบบก็จะกันพื้นที่ให้เลย ใช้ไม่ใช้ก็จะเสียพื้นที่ไป แต่การจองไว้เลยนี้จะให้ประสิทธิภาพการทำงานดีกว่าดิสก์แบบบาง อย่างไรก็ตามการสร้างดิสก์เสมือนแบบ Zeroed Thick จะยังไม่มีการเขียนศูนย์ลงไปในตอนสร้างดิสก์เสมือน แต่จะเขียนศูนย์ลงไปบนแต่ละบล็อคเมื่อบล็อคนั้นจะถูกใช้ (run-time) วิธีการแบบนี้จะทำให้การสร้างดิสก์เสมือนขึ้นมาใหม่ใช้เวลาไม่นานนัก
Eager Zeroed Thick เป็นดิสก์เสมือนแบบหนาที่เขียนศูนย์ให้เสร็จสรรพ กล่าวคือเมื่อเราต้องการพื้นที่ 100 กิกกะไบต์สำหรับสร้างดิสก์เสมือนแบบนี้ ระบบจะกันพื้นที่ 100 กิกกะไบต์ให้ทันที พร้อมทั้งเขียนศูนย์ลงไป (create-time) นั่นทำให้เสียเวลาในการสร้างขึ้นมาใหม่มากกว่าสองแบบที่ผ่านมา แต่สิ่งที่จะได้มาก็คือประสิทธิภาพในการใช้งานจะดีกว่าอย่างแน่นอน ดิสก์เสมือนแบบหนาเขียนศูนย์เลยจำเป็นมากกับความสามารถของ VMware Fault Tolerance (FT) และการนำดิสก์เสมือนไปใช้งานกับระบบ Microsoft Cluster Services (MSCS)
เมื่อเราเข้าใจประเภทของดิสก์เสมือนลึกซึ้งดีแล้ว เราก็กลับมาที่ 3PAR Thin Persistance…. แน่นอนว่าสตอเรจของสามพาร์สามารถช่วยในกรณีที่เราสร้าง Eager Zeroed Thick ได้ในการเขียนเลขศูนย์ลงไปทุกบล็อค เพื่อให้การสร้างดิสก์เสมือนแบบนี้เร็วขึ้น รวมทั้งไม่ต้องอาศัยทรัพยากรจากโฮสต์ นอกจากนั้นสามพาร์ยังมีความสามารถในการทำ Thin Persistance ผ่านทางชิป 3PAR Gen3 ASIC ที่อยู่บนสตอเรจ เพื่อช่วยให้ดิสก์อย่างหนาแบบเขียนศูนย์ กลายเป็นดิสก์อย่างบางแบบหนาแบบเขียนศูนย์ หมายถึง แทนที่ต้องเสียพื้นที่ไปเปล่าๆ สำหรับเก็บเลขศูนย์ เราก็จะไม่ต้องเสียไป เช่น หากเราต้องการดิสก์เสมือนแบบ Eager Zeroed Thick ขนาด 100 กิกกะไบต์ แล้วมีข้อมูลเก็บอยู่เพียง 20 กิกกะไบต์ เท่ากับเราต้องเสียพื้นที่ไป 80 กิกกะไบต์ไปเปล่าๆ เจ้า Thin Persistance (คือการคงความบางไว้อย่างยิ่งยวด) ก็จะเข้ามาช่วยให้เราไม่ต้องเสียพื้น 80 กิกกะไบต์ที่ยังไม่ได้ใช้ มันจะทำการหลอกโฮสต์ (ESX/ESXi) อีกทีว่าคุณมีดิสก์เสมือนอยู่ 100 กิกกะไบต์นะ พร้อมเขียนเลขศูนย์ไว้เสร็จ แต่จริงๆ แล้วสามพาร์จะใช้เสียพื้นที่ไปเพียง 20 กิกกะไบต์เท่านั้น นับเป็นความสามารถที่ช่วยเสริมส่งให้สามพาร์ยังถือครองความเป็นผู้นำด้านสตอเรจแบบบางๆ ไว้ต่อไปเหนือคู่แข่งอื่นๆ
วันนี้ลาไปกับความสามารถอันน่าทึ่งของเจ้าสามพาร์สตอเรจแต่เพียงเท่านี้ก่อน ไว้โอกาสหน้าเมื่อได้มีโอกาสได้ใกล้ชิดกับมันมากกว่านี้ คงมีอะไรมาเล่าให้ฟังอีก…. สวัสดี
อ้างอิง