Monday, December 22, 2008

OpenVPN สามารถใช้งานหลัง NAT ได้ทั้งได้ Server และ Client

http://www.itdestination.com/articles/openvpn/

วิธีเพิ่ม RDP Listening Port ของ Terminal Server

How can I add a new RDP listening port to Windows 2000/2003 Terminal Server?

http://www.petri.co.il/add_a_new_rdp_listening_port_to_terminal_server.htm

Monday, December 15, 2008

Enabling the ISA Server 2004 VPN Server

การ set vpn ให้ connect จาก WindowsXP,2003,XP ไปยัง ISA Server ที่อยู่หลัง NAT ผ่าน PPTP หรือ L2TP ถ้า ISA Server มี IP จริงสามารถใช้ L2TP ได้แต่ถ้าไม่มี IP จริงแล้วใช้การ Forward port จะต้องใช้ PPTP แทน โดย forward port 1723 TCP มาที่ ISA ด้วย
http://www.isaserver.org/articles/2004vpnserver.html

Tuesday, December 09, 2008

Open Port for PPTP VPN

ถ้าต้องการใช้งาน PPTP ที่อยู่หลัง Firewall หรือ NAT ทำให้ไม่ได้รับ IP จริง จะต้องทำการ forward port หรือเปิด port ให้กับ port 1723 TCP จึงจะสามารถใช้งานได้

ส่วน L2TP VPN จะไม่สามารถใช้งานได้ถ้าอยู่หลัง NAT เพราะว่าจะต้องมี IP จริง

Tuesday, November 25, 2008

Remote Assistance for Corporate

ปกติแล้วการจะใช้งาน Remote Assistance นั้นจะต้องมีการ invite ก่อนเสมอ แต่สำหรับการใช้งานแบบ Helpdesk ภายในบริษัทนั้น เราสามารถใช้ GPO เข้ามาช่วยให้ไม่ต้องมีการ invite ก่อนก็ได้ โดยมีวิธีการดังนี้

1. ใช้ GPO ไปที่ Computer Configuration/Administrative Template/System/Remote Assistance และ Enable Offer Remote Assistance
2. เลือก Helper ที่จะสามารถ remote เข้ามาใช้งานหน้าเครื่องได้ โดยให้อยู่ใน format ดังนี้ DOMAIN\USERNAME โดยที่ User นั้นจะต้องเป็นสมาชิกของ Local Administrator
3. จากเครื่องของ Helper ให้ไปที่ Help and Support/Tool/Offer Remote Assistance แล้วใส่ IP หรือชื่อเครื่องที่ต้องการ Remote เข้าไป
4. ที่หน้าเครื่องของ user จะมี popup ขึ้นมาให้ถามว่าจะยอมให้ remote เข้ามาควบคุมหรือไม่

NOTE
- ยังไม่ได้ทดสอบให้แน่ใจ หลายๆอย่าง เช่น การ block remote assistance , firewall
- ถ้า user ที่ไม่ได้อยู่ใน list ของ helper เวลา remote ไปจะขึ้นว่า Permission Denied
- เครื่องที่ connect เข้าไปถ้าไม่ได้อยู่ใน domain เดียวกัน จะไม่สามารถ remote เข้าไปได้
- ใน helper list สามารถเพื่ม group ก็ได้ ไม่จำเป็นจะต้องเป็น user เท่านั้น เช่น DOMAIN\administrators ก็ได้เหมือนกัน
- GPO ที่อยู่ติดกับ Offer Remote Assistance ก็คือ Solicited Remote Assistance เราสามารถ Disable เอาไว้ได้ ไม่มีผลต่อการใช้ Remote Assistance ใน Corporate
- เมื่อ Enable Offer Remote Assistance ใน GPO แล้วจะทำให้ตัวเลือกของ Remote Assistance ที่อยู่ใน tab Remote ของ System ได้ถูก Enable เอาไว้ด้วย แต่ยังไม่ได้ลองว่า user จะสามารถส่ง Invite ออกไปทาง Msn หรือทาง Email ได้หรือเปล่า

http://www.petri.co.il/enable_remote_assistance_offering_in_xp_2003.htm
http://www.petri.co.il/offer_remote_assistance_in_windows_xp.htm

Sunday, November 02, 2008

Event ID 7000 (Service Control Manager Timeout)

To work around this problem, increase the default timeout value for the service control manager in the registry.


To increase the timeout value in the registry, follow these steps:


If the ServicesPipeTimeout value is not available, add the new DWORD value, and then set its value data to 60000 in the Control key. To do so, follow these steps: a. Locate and then click the following registry key:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet

b. Click the Control subkey.

c. On the Edit menu, point to New, and then click DWORD Value.

d. Type ServicesPipeTimeout, and then press ENTER.

e. Right-click the ServicesPipeTimeout DWORD value, and then click Modify.

f. Click Decimal.

g. Type a value of 120000, and then click OK.

The value is 120000 milliseconds and is equivalent to 120 seconds or to one minute.


Note This change does not take effect until the computer is restarted.

Wednesday, August 27, 2008

Iphone Installer / Cydia Repositories

http://xsellize.com/installer

Tuesday, August 26, 2008

Arcserve Job Script and Job Template

Job Scripts

You can save any type of job as a script. The script contains the source, destination, and options that you selected, as well as the schedule information. It also contains any filters you created to include and exclude files and directories.

Creating a script has the following advantages:
1. You can re-use the same settings at a later time.
2. You can copy your settings to a different network machine running BrightStor ARCserve Backup.
3. You can quickly resubmit regularly executed jobs after a job has been accidentally deleted.

To use a script, go to the Job Status Manager and use the Add Job button. When you specify the job script name, all of the information that you set when you saved the job script will be used, including the files and directories and the scheduling information.

Create and Use Job Scripts

To create a script, perform the following procedure:
1. Set up the job.
Select the source, destination (if required), scheduling method, and any options or filters.
2. Click Start.
3. Fill in the requested security (and for backups, agent) information.
4. When the Submit Job dialog appears, click Save. (ปุ่ม save job ที่อยู่ทางด้านขวามือ ของ Dialog)
The Save Job Script dialog appears.
5. Give the script a name.
BrightStor ARCserve Backup scripts are stored in the BrightStor ARCserve Backup home directory by default, extension ".asx". You can specify a different directory in which to save your script. You can also provide a job description in the edit text box.
6. Click Save.

Note: You can also save job scripts using the Save or Save As options from the File menu.
To use a script, perform the following procedure:
1. Open the Job Status Manager.
2. Click Add Job. (ไม่ได้อยู่ใน menu แต่ให้ click ขาวในหน้า Job Status)
3. Specify the script file name.

Job Templates

A job template contains a series of settings such as the destination, options, and schedule information for the job. Similar to job scripts, a template can also contain any filters you created to include and exclude files and directories.

Job templates are different from job scripts because they provide the flexibility to repeat custom backup schedule settings on other BrightStor ARCserve machines. Because the job template does not retain the backup source information as the job script does, the template files can be copied and applied to any new server source running BrightStor ARCserve Backup. Job scripts, on the other hand, cannot be modified to accommodate new server sources.

You can choose from seven default job templates or you can create a custom template to meet your individual backup needs. The default job templates are designed to meet specific backup tasks such as rotation scheme, backup method, and GFS options. The default job templates can be accessed from the File menu when you choose the Open Job Template option.

Create Job Templates

You can create a custom job template that you can save for future jobs on any BrightStor ARCserve Backup machine.

To create a job template:
1. Open the Backup Manager by selecting Backup Manager from the Quick Start menu.
2. Make selections for your backup job by accessing the Source, Destination, and Schedule tabs.
3. Submit your job by clicking the Start button.
4. Click Save Template in the Submit Job dialog box to save your new job template with an .ast filename extension.

While default job templates are stored in the Templates/Jobs folder in the BrightStor ARCserve Backup directory, you can save your template in any directory you want. To open your custom job template on a local machine or from a remote server, access the File menu and choose the Open Job Template option. Once the job template is open, you can submit your job.

Zyxel Backup and Restore Config

ftp to zyxel with user root
for backup get rom-0
for restore put rom-0
zyxel will auto reboot

all information include ip address and user/password will change to new config

Thursday, August 07, 2008

ท่อ PVC

ท่อ PVC ให้ใช้ยี่ห้อท่อน้ำไทย

ท่อเดินเมนทั่วไป ชั้น 8.5 ขนาด 2 นิ้ว
ท่อเดิน ขึ้นบ้านทุกจุด 1 นิ้ว
พอจะออกมาที่ จุดก๊อก จึงลดโดยใช้ข้อลดเหลี่ยม
จาก 1 เป็น 1/2 นิ้วครับ

จุดที่มีการเปลี่ยนจากท่อ PVC เป็นเหล็ก
ต้องใช้ข้อต่อเกลียวใน แบบทองเหลือง ฝังในตัว PVC ครับ

ท่อน้ำทิ้ง ชั้น 5 ขนาด 2 นิ้ว
ท่อส้วม ชั้น 5 ขนาด 4 นิ้ว

ชั้น 8.5 หมายถึง ทนแรงดันได้ 8.5 kg/ ตารางซม. ครับ
ชั้น 5 หมายถึง ทนแรงดันได้ 5.0 kg/ตารง ซม. ครับ

ทุกๆ 1 kg หมายถึง เท่ากับ แรงดันที่เกิดจากน้ำสูง 10 เมตรครับ
ดังนั้น 8.5 หมายถึง ทนแรงดันได้ เท่ากับ การตั้งแท้งค์น้ำไว้สูง 85 เมตรครับ
ซึ่งยังไม่เห็นมีใครทำ

อย่างมาก 25 เมตรก็สูงลิบแล้ว

(ยกเว้นอาคารใหญ่ๆ) จะเป็นระบบท่ออีกอย่างหนึ่ง

เครดิต น้าพร@pantip

Tuesday, July 22, 2008

Note for Receriver

Astro ทอง ใช้ encryption แบบ NDS Version 1 หรือบางทีเรียกว่า VideoGuard

LNB ของ Astro เป็นแบบ Universion คือ LO = 09750 , HI = 10600, Threshold = 11700
LNB ของ UBC ใช้ LO/HI = 11300 , Threshold = 11700
LNB ของ C-band ใช้ 05150 ทั้ง LO/HI , Threhold = 11700

Tuesday, May 27, 2008

How to convert an IP address from the firewall log into a dotted IP address.

แบบที่ 1

SELECT
CAST(SourceIP / 256 / 256 / 256 % 256 AS VARCHAR) + '.' +
CAST(SourceIP / 256 / 256 % 256 AS VARCHAR) + '.' +
CAST(SourceIP / 256 % 256 AS VARCHAR) + '.' +
CAST(SourceIP % 256 AS VARCHAR) AS [Nice Source Ip], FirewallLog.*
From FirewallLog

แบบที่ 2 สร้าง Function เอาไว้ให้เรียกใช้งานได้ง่าย

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

CREATE FUNCTION [dbo].[ConvertLongIP]
(
@LongIP bigint
)

RETURNS varchar(15)
AS
BEGIN

DECLARE @DotIP varchar(15),
@bin varbinary(4)
select @bin = cast(@LongIP as varbinary(4))
select @DotIP = cast(convert(int,substring(@bin,1,1)) as varchar(3)) + '.'
+ cast(convert(int,substring(@bin,2,1)) as varchar(3)) + '.'
+ cast(convert(int,substring(@bin,3,1)) as varchar(3)) + '.'
+ cast(convert(int,substring(@bin,4,1)) as varchar(3))
RETURN @DotIP
END

การลบข้อมูลใน SQL 2005 ที่เก่ากว่า 90 วัน

แบบที่ 1
DELETE FROM WebProxyLog where LogTime < (getdate() - 90) DELETE FROM FirewallLog where LogTime < (getdate() - 90) แบบที่ 2 ดีกว่า ลบได้แน่นอนกว่า delete from firewalllog where datediff(dd,logtime,getdate()) > 90
delete from webproxylog where datediff(dd,logtime,getdate()) > 90
select logtime from firewalllog where datediff(dd,logtime,getdate()) > 1

ได้ผล แต่ต้องรอ 2 วัน ดีกว่าการใช้ แบบที่ 1

ถ้าใช้ SQL Express Edition ที่ไม่มี Scheduler จะต้องใช้ Schedules Tasks ของ Windows แทนเช่น
sqlcmd -S .\ISALOG -d ISALOG d:\ISALOG\cleandatabase.sql
แล้วค่อยใส่คำสั่ง delete from ... ลงไปในไฟล์ cleandatabase.sql

-S = ชื่อ server , . หมายถึง localhost , \ISALOG คือชื่อ Instant
-d = ชื่อ database
-i = ชื่อ sql script

http://msdn.microsoft.com/en-us/library/aa258269(SQL.80).aspx

Monday, May 26, 2008

วิธี Block MSN หรือ Windows Live Messenger

Concept ใช้ได้กับ Firewall เกือบทุกตัว
ให้ Block MSN protocal ที่ใช้ port 1863 เพื่อเป็นการบังคับให้ MSN เปลี่ยนไปใช้ port 80 HTTP จากนั้นค่อยทำการ block signature ของ MSN นั่นก็คือการ Block Request URL ที่มี string gateway/gateway.dll เป็นส่วนประกอบ

การ Block Signature โดยใช้ ISA Firewall
1. ไปที่ rule ที่มี http protocal รวมถึง rule ที่ยอมให้ออกหมดทุก protocal (ทุก protocal หมายถึง ทุกอันที่ define เอาไว้ใน protocal definition ดังนั้นจึงรวม http protocal เข้าไปด้วย) แล้ว click ขวาเลือก Configure HTTP
2. ไปที่แถบ Signature กดปุ่ม Add ใส่ข้อมูลตามนี้
Name = Block MSN
Search in = Request URL
Signature = gateway/gateway.dll


Note
สรุป port และ URL ของบริการที่ MSN ใช้
http://support.microsoft.com/kb/927847

Tuesday, May 20, 2008

ISA 2004/2006 logging using local SQL 2005

การ Config ในส่วนของ SQL Server

- Install Microsoft SQL 2005 Express Edition
- ปัจจุบันออก SP3 แล้ว จะรวมมาใน package เลย
- ในหน้า Registration Information ให้เอา checkbox Hide advace configuration option เพื่อให้สามารถตั้งชื่อ Instant ได้ให้ชื่อว่า ISALOG
- Service Account ให้เลือกเป็น Local System ตรงนี้สำคัญมากว่าจะต้องทำให้ User ที่ใช้ run service ISA Firewall กับ SQL2005 เป็น User เดียวกันไม่งั้นจะ start SQL Log ไม่ได้ ในเวป isaserver.org เป็นกรณีที่ SQL Server เป็น Server คนละตัวกับ ISA Firewall แต่ในกรณีนี้เราต้องการให้อยู่บน server เดียวกัน ดังการการ setting จึงต่างกันนิดหน่อย
- เลือก Windows Authentication Mode
- Add User to the SQL Server Administrator Role จะเป็นการเพื่ม user ที่เป็นคน install sql 2005 ให้อยู่ใน administrator role ของ SQL 2005 จะเลือกหรือไม่ก็ได้ (เลือกเอาไว้ดีกว่า)
- หลังจาก Install เสร็จแล้ว ให้ไปดูที่ Service ของ Microsoft Firewall และ SQL Server (ISALOG) run ด้วย user เดียวกันคือ Loal System ถ้าไม่ตรงก็เปลี่ยนให้ตรงกัน
Note ถ้ามีปัญหา start SQL ไม่ได้แล้วถ้าไปดูใน eventlog จะเห็นว่า error มันเกิดจากการที่ user ที่ใช้ run service ไม่ผ่าน มันไม่ได้เป็น user เดียวกับที่ไปกำหนดให้ใช้ในตอน config log ของ ISA ด้วย สังเกตุได้จากในขั้นตอนนั้นใส่ user อะไรไปก็จะ Test ผ่านหมด
- Install Microsoft SQL Server Management Studio Express
- เปิด SQL Studio Express ขึ้นมาเพื่อสร้าง Database ISALOG เอาไว้ที่ Drive D: (ถ้าไม่กำหนดเอง มันสร้างไว้ที่ Drive C:) เพราะว่าต้องเก็บ log เอาไว้ 90 วันตามพรบ ใช้เนื้อที่มาก
- ที่ Object Explorer แตกออกมาให้เห็น Database แล้ว Click ขวาเลือก New Database ตั้งชื่อ Database = ISALOG
Owner = NT AUTHORITY\SYSTEM
Path = D:\ISALOG
- สร้าง Table FirewallLog และ WebProxyLog ขึ้นมาให้อยู่ใน Database ISALOG โดยใช้ script FWSRV.SQL และ W3PROXY.SQL ที่มีมาให้อยู่แล้วใน ISA2006 folder
- ไปที่ Menu File/Open แล้วเปิด fwsrv.sql และ w3proxy.sql พิมพ์เพิ่มเข้าไปข้างบนว่า
USE ISALOG
เพื่อเป็นการบอกให้สร้าง table เอาไว้ใน Database ISALOG แล้วสั่ง Execute
- ย้อนกลับไปดูใน Datbase ISALOG จะเห็นว่ามี table เพิ่มขึ้นมา 2 table คือ dbo.firewalllog และ dbo.webproxylog
- เปิด SQL Server Surface Area Configuration ขึ้นมาแล้วไปที่ Remote Connection เปลี่ยนจาก Local connection only เป็น Local and remote connection -> Using TCP/IP only
- เปิด SQL Server Configuration Manager ขึ้นมา ไปที่ Protocal for ISALOG -> ICP/IP = Enable
ไปแถบ IP Address แล้ว Enable ทุก IP Address , ลบ Dynamic Port ออกให้ว่างๆ, TCP Port ใส่ 1433 ทุกอัน , Enable = Yes ทุกอัน
- OK แล้ว Restart SQL Service
- ไม่จำเป็นต้อง assign permission อะไรใน Database ISALOG เพราะ system สามารถเขียนข้อมูลลงไปได้อยู่แล้ว

การ Config ใส่ส่วนของ ISA Server

- เปิด Edit System Policy(อยู่ใน Task Pane ของ Firewall Policy)/ Logging/ Remote Logging /
แถบ General -> Enable this configuration group
- ไปที่ Monitoring /Logging /Configure Firewall Loggin เลือก SQL Database / Option
Server = ชื่อของ ISA Firewall
Port = 1433
Database = ISALOG
Table = FirewallLog (หรือ WebProxyLog)
Uncheck Force data encryption เพราะเราใช้ Local Database ไม่ใด้ใช้ Remote Database
เลือก Use Windows authentication
User = อะไรก็ได้ ไม่มีผลเพราะใช้งานโดย Local System
Password = อะไรก็ได้ ไม่มีผลเพราะใช้งานโดย Local System
กด Test จะผ่าน

Testing
- เปิด SQL Studio Express ขึ้นไปแล้วไปที่ New Query พิมพ์ว่า
select * from dbo.firewalllog แล้วกดปุ่ม Execute จะเห็น log ที่เก็บไว้
- ทดสอบ Webproxylog พิมพ์ว่า
select * from dbo.webproxylog
- อย่าลืมให้เลือก Database ISALOG ตรง Dropdown ด้านซ้ายบนด้วย ไม่งั้นจะ error เพราะว่ากลายเป็นการ query จาก database อื่น

Note

- ISA 2004 ใช้ ODBC แต่ ISA 2006 ใช้ Direct Access to SQL
- อย่าทำ Compress Disk กับ drive ที่เก็บ data file ของ SQL เพราะจะทำให้ performance ตกลง 500%
- เว็ปที่มีประโยชน์เกี่ยวกับ ISA อีกเวปนึง
http://www.elmajdal.net/ISAServer/

Thursday, May 15, 2008

GFI Webmonitor V.4

White List - จะ bypass กฎทุกอย่างเช่น block hi5 แต่ถ้าใส่ user ที่ไม่ต้องการ block เอาไว้ใน white list แล้วจะเข้าได้ หรืออาจจะสามารถใส่ ip หรือ hostname ของ site ที่ต้องการเข้าก็ได้เช่น *.google.com, *.yahoo.com จะทำให้ site พวกนี้ผ่านกฎทุกกฎ ดังนั้นให้ใช้อย่างระมัดระวัง

Black List - ถ้ามีชื่ออยู่ใน black list จะห้ามทุกอย่าง

Web Filtering Policies - สามารถ Edit ได้ว่าต้องการให้ Filter content ไหนออกไปได้บ้าง อาจจะนำมาใช้กับ MSN ก็ได้(ไม่ได้ผลลองแล้ว) โดยทั่วไปจะใช้ไม่ให้เข้าเวปพวกที่มี Adult Content

Download Control Policies - สามารถเอาไว้ block ไม่ให้ download ไฟล์บางประเภทได้โดยดูจาก Content-type อาจจะเอามาประยุกต์ใช้ไม่ให้ download ไฟล์บางนามสกุลได้

Virus Scanning Policies - สามารถไปกำหนดให้ Scan Virus กับไฟล์ประเภทไหนบ้าง แล้วขึ้นจะให้ขึ้น Download Status Windows หรือเปล่า ถ้าเจอ Virus จะให้ทำยังไงเช่น delete หรือ warn

Whitelist = *.eset.com สำหรับ update nod32
Blacklist = *.hi5.com

Saturday, May 10, 2008

Schedule Task

ใน Run As ให้ใช้ NT AUTHORITY\SYSTEM โดยที่ไม่ต้อง set password จะทำให้ใช้ได้ตลอด ไม่ต้องกังวลเรื่องที่จะเปลี่ยน pasword แล้ว task ไม่ยอม run

Wednesday, April 30, 2008

SM Bus Controller Driver Download

SM Bus Controller
ต้องลง Intel® Chipset Software Installation Utility สามารถ download ได้จาก http://downloadcenter.intel.com/Product_Filter.aspx?ProductID=816

สำหรับ Sound Driver
Hotfix KB888111 UAA สำหรับ SP3 ยังไม่มี ต้องใช้ของ SP2 ไปก่อนโดยไปหลอกให้เห็นเป็น SP2 โดยการแก้ registry key HKLM\SYSTEM\ControlSet001\Control\Windows\CSDVersion = 200 จาก 300 แล้วค่อย install KB888111 สำหรับ SP2 แล้วค่อย install audio driver

Saturday, April 26, 2008

ISA2006 Backup and Restore

Backup ทั้งหมด

Export
1. เปิด ISA Server Management ขึ้นมา แล้ว right click ที่ ชื่อ ISA Server เลือก Export (Backup) ทำตาม Wizard
2. ถ้าต้องการ export user passwd ที่ได้มีการ set ไว้ใน ISA จะต้องติ๊กที่ Export confidential infomation ด้วย เพื่อให้เราใส่ passwd ในการ encrypt ข้อมูลเหล่านี้เพื่อความปลอดภัย
3. ถ้ามีการ set user เพื่อ delegate จะต้องเลือก Export user permission settings ด้วย

Import
1. การ import ก็ทำคล้ายกัน แต่จะมี option ให้เลือกว่าจะ Import หรือ Overwrite(restore)
- import ข้อมูลที่ import เข้ามาจะถูกเพื่มเข้าไปเข้าไปใน configuation (ข้อมูลปัจจุบันไม่หายทั้งหมด)
- overwrite(restore) จะเข้าไปทับข้อมูลปัจจุบันทั้งหมด(ข้อมูลปัจจุบันหายหมด) เอาไว้ใช้ในกรณีที่ ISA พัง

Note
ข้อมูลที่ Export ออกมาไม่สามารถเอาไปใช้ข้าม version กันได้เช่นระหว่าง Standard กับ Enterprise ใช้กันไม่ได้

Backup แค่บางส่วน
ให้เลือก object ที่ต้องการ backup แล้ว right click เลือก import/export หรืออาจจะเลือกจาก Task Pane ก็ได้

Monday, April 21, 2008

วิธีใช้ Windows Server 2008 แบบไม่หมดอายุ

1. เวลา Install ไม่ต้องใส่ Cdkey และ Disable Auto Activate
2. Disable Service SL UI Notification เพื่อจะได้ไปสามารถลบไฟล์ออกได้
3. Take Ownership ของไฟล์เหล่านี้
c:\windows\system32\SLLUA
c:\windows\system32\SLUI
c:\windows\system32\SLUINotify.dll
4. Restart และลบไฟล์เหล่านี้ออก หรือถ้าสามารถลบออกได้โดยไม่ต้อง Restart ก็ลบไปเลย
5. Restart และทดสอบโดยการตั้งเวลาล่วงหน้าไป 1 ปี และลอง Restart อีกที แล้วลองเข้า Windows Update ถ้าทำได้ปกติ ก็แสดงว่าผ่าน