• 31Aug

    การกำหนดช่วงการจ่าย IP ของ Coova

    dhcpstart 100
    dhcpend 200

    คำสั่งเพื่อไม่ให้ coova จ่าย IP

    nodynip

  • 31Aug

    อ่านได้จากที่นี่ครับ

    http://www.oknation.net/blog/print.php?id=489871

  • 16Jul

    เปิดโลกเครือข่าย Cisco ตอนรู้จัก VLANและติดตั้ง VLAN บน Switches

    ดร.วิรินทร์ เมฆประดิษฐสิน

    VLAN คืออะไร ?  

    ข้อดีของการใช้งาน VLAN 

    ความแตกต่างระหว่าง Switched LAN กับ VLAN

    ชนิดของ VLAN

    Port-Based VLAN

    Mac Address-Based VLAN

    IP หรือ Subnet-Based VLAN

    Protocol-Based VLAN

    Application-Based VLAN

    การเชื่อมต่อ VLAN เข้าด้วยกัน

    ชนิดของ VLAN ในความหมายของ Cisco

    รู้จักกับ Tagged VLAN

    VLAN Trunking Protocol(VTP)

    สรุปจุดประสงค์หลักของ VTP

    VTP ADVERTISEMENT

    VTP ทำงานได้อย่างไร

    VTP SWITCH MODE

     VTP Pruning

     แนวทางการจัด VLAN CONFIGURATION

     ขั้นตอนการจัด Configuration Mode

     แนวทางการจัด VTP Configuration

     

    VLAN คืออะไร ?

    VLAN (Virtual Area Network) เป็นการจัดแยกการเชื่อมต่อเครือข่ายในรูปแบบที่เรียกว่า โดเมนส์ ซึ่งจุดประสงค์ของการแยกออกเป็นโดเมนส์นี้ ก็เพื่อให้เครื่องคอมพิวเตอร์ที่อยู่ต่างโดเมนส์ไม่สามารถสื่อสารกันได้ ทั้งนี้เพื่อความปลอดภัยของเครือข่าย รวมทั้งสามารถเพิ่มประสิทธิภาพการทำงานของเครือข่ายอีกด้วย

    ในหนึ่งเครือข่ายอาจประกอบด้วย Switching Hub หลาย ๆ ตัว และใน Switching Hub หนึ่งตัวอาจประกอบด้วย VLAN หลาย ๆ โดเมนส์ หรือหลาย VLAN ก็เป็นได้ การแบ่ง VLAN จะทำให้เครื่องคอมพิวเตอร์แม้จะเชื่อมต่อกันใน Switches Hub เดียวกัน แต่อยู่ต่าง VLAN กัน ไม่สามารถสื่อสารกันได้ รวมทั้งไม่สามารถมองเห็นกันได้ด้วยซ้ำไป (รูปที่ 1)

    และที่แน่นอน หนึ่ง VLAN สามารถกระจายไปตาม Switches Hub ต่าง ๆ ได้ เช่นกัน ภายใต้ Switches Hub ของ Cisco 1 ตัว สามารถติดตั้ง VLAN ได้มากถึง 64 VLAN และทั้งระบบสามารถมี VLAN ได้มากถึง 1024 VLAN

                       

    รูปที่ 1 แสดงการแบ่ง VLAN ออกเป็น 2 ชุด ภายใน Switches เดียว

     

    ข้อดีของการใช้งาน VLAN

    • สามารถป้องกันปัญหา Broadcast มิให้ฟุ้งกระจายไปทั่วทั้งเครือข่าย

    • สามารถจำกัด Traffic ให้อยู่ ในบริเวณที่สามารถควบคุมได้

    • เพื่อการรักษาความปลอดภัยที่ดี เนื่องจากการแบ่ง VLAN จำให้ผู้ที่อยู่ต่าง VLAN กันจะไม่สามารถมองเห็นกันได้ เมื่อมองเห็นกันไม่ได้ ก็ไม่สามารถโจมตีกันได้

    • สามารถกำหนดขอบเขตการแพร่กระจายข้อมูลเฉพาะกลุ่มได้ (Multicast)

    • สามารถเพิ่มประสิทธิภาพการทำงานของเครือข่าย เนื่องจากสามารถลดปัญหาของ Broadcast จากสาเหตุต่างๆ ลงได้

                     

    รูปที่ 2 แสดงลักษณะการแบ่ง VLAN ออกเป็น 2 ส่วนได้แก่ VLAN แผนกบัญชีและ VLAN แผนกบริหารจัดการ

    Continue reading »

  • 09Jul

    ผมเขียนบันทึกนี้ หลังจาก server ผมมีคนพยายามเข้ามา hack จนเครื่องผมค้างไปเลย เป็นสิ่งที่ดีคับ ทำให้ผมมีความรู้ และเข้าใจมากขึ้น ผมหาอ่านบทความ และก็ได้แปลมา ขอนอกเรื่องครับ ผมเขียน blog ที่อุณหภูมิ 31 องศาเซลเซียส อ้าวได้ใจมากคับ

    หลังจากติดตั้ง LAMP แล้ว สิ่งที่อย่างแรกคือ การป้องกันการโจมตี
    Step 1: ป้องกันการแสดงผลแบบ list view

    sudo nano /etc/apache2/sites-available/default

    เพิ่มเครื่องหมายลบ – หน้า Index ตามแบบข้างล่าง

    <Directory /var/www/>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

     

    Step 2 :

    สำหรับ Apache ตั้งแต่ version 1.3.34 และ 2.0.55 ขึ้นไปนะครับ ทำได้โดยเพิ่ม

    TraceEnable Off

    ใน config ของ apache ซึ่งจะทำให้ปิดการใช้งาน Trace ได้

    ถ้าเป็นรุ่นเก่ากว่านี้หน่อยต้องเปิดใช้ rewrite module ของ Apache.

    sudo a2enmod rewrite

    เพื่อหลีกเลี่ยงการโจมตีแบบ Cross-Site-Tracing ให้เพิ่ม 3 บรรทัดนี้ ใน ” <VirtualHost *:80>” :

        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^(TRACETRACK)
        RewriteRule .* – [F]

    Step 3 :

    เพื่อป้องการทำ HTTP DoS, DDoS หรือ Brute Force attack, ต้องติดตั้ง Moduleนี้

    sudo apt-get install libapache2-mod-evasive

    Step 4 :

    To screen out bad URL requests, such as /etc/shadow or MySQL injection and etc. You should install mod_security module. If you installed a amd64 (64-bit) version of Ubuntu Server, please replaced i386 with amd64 for the following commands.

    wget http://etc.inittab.org/~agi/debian/libapache-mod-security2/libapache-mod-security_2.5.9-1_i386.deb

    wget http://etc.inittab.org/~agi/debian/libapache-mod-security2/mod-security-common_2.5.9-1_all.deb

    sudo dpkg -i libapache-mod-security_2.5.9-1_i386.deb mod-security-common_2.5.9-1_all.deb

    Step 5 :

    ไม่อนุญาตให้ print the error pages

    sudo nano /etc/apache2/conf.d/security

    แก้ไขตามนี้

    ServerToken Prod
    ServerSignature Off

    Step 6 :

    มาถึงคิวของ PHP

    sudo nano /etc/php5/apache2/php.ini

    แก้ไขให้เป็นแบบข้างล่างนี้

    display_errors = Off
    log_errors = On
    allow_url_fopen = Off
    expose_php = Off
    enable_dl = Off
    disable_functions = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd

    Step 7 :

    ขั้นตอนสุดท้าย

    sudo /etc/init.d/apache2 restart

    Step 8 :

    sudo nano /etc/sysctl.conf

    เอา # ออก

    #Enable TCP SYN Cookie Protection
    net.ipv4.tcp_syncookies = 1

    สั่งให้ทำงานเลย

    sudo /sbin/sysctl -p

    ผมเขียนบันทึกนี้ หลังจาก server ผมมีคนพยายามเข้ามา hack จนเครื่องผมค้างไปเลย เป็นสิ่งที่ดีคับ ทำให้ผมมีความรู้ และเข้าใจมากขึ้น ผมหาอ่านบทความ และก็ได้แปลมา ขอนอกเรื่องครับ ผมเขียน blog ที่อุณหภูมิ 31 องศาเซลเซียส อ้าวได้ใจมากคับ

    หลังจากติดตั้ง LAMP แล้ว สิ่งที่อย่างแรกคือ การป้องกันการโจมตี
    Step 1: ป้องกันการแสดงผลแบบ list view

    sudo nano /etc/apache2/sites-available/default

    เพิ่มเครื่องหมายลบ – หน้า Index ตามแบบข้างล่าง

    <Directory /var/www/>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

     

    Step 2 :

    สำหรับ Apache ตั้งแต่ version 1.3.34 และ 2.0.55 ขึ้นไปนะครับ ทำได้โดยเพิ่ม

    TraceEnable Off

    ใน config ของ apache ซึ่งจะทำให้ปิดการใช้งาน Trace ได้

    ถ้าเป็นรุ่นเก่ากว่านี้หน่อยต้องเปิดใช้ rewrite module ของ Apache.

    sudo a2enmod rewrite

    เพื่อหลีกเลี่ยงการโจมตีแบบ Cross-Site-Tracing ให้เพิ่ม 3 บรรทัดนี้ ใน ” <VirtualHost *:80>” :

        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} ^(TRACETRACK)
        RewriteRule .* – [F]

    Step 3 :

    เพื่อป้องการทำ HTTP DoS, DDoS หรือ Brute Force attack, ต้องติดตั้ง Moduleนี้

    sudo apt-get install libapache2-mod-evasive

    Step 4 :

    To screen out bad URL requests, such as /etc/shadow or MySQL injection and etc. You should install mod_security module. If you installed a amd64 (64-bit) version of Ubuntu Server, please replaced i386 with amd64 for the following commands.

    wget http://etc.inittab.org/~agi/debian/libapache-mod-security2/libapache-mod-security_2.5.9-1_i386.deb

    wget http://etc.inittab.org/~agi/debian/libapache-mod-security2/mod-security-common_2.5.9-1_all.deb

    sudo dpkg -i libapache-mod-security_2.5.9-1_i386.deb mod-security-common_2.5.9-1_all.deb

    Step 5 :

    ไม่อนุญาตให้ print the error pages

    sudo nano /etc/apache2/conf.d/security

    แก้ไขตามนี้

    ServerToken Prod
    ServerSignature Off

    Step 6 :

    มาถึงคิวของ PHP

    sudo nano /etc/php5/apache2/php.ini

    แก้ไขให้เป็นแบบข้างล่างนี้

    display_errors = Off
    log_errors = On
    allow_url_fopen = Off
    expose_php = Off
    enable_dl = Off
    disable_functions = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd

    Step 7 :

    ขั้นตอนสุดท้าย

    sudo /etc/init.d/apache2 restart

    Step 8 :

    sudo nano /etc/sysctl.conf

    เอา # ออก

    #Enable TCP SYN Cookie Protection
    net.ipv4.tcp_syncookies = 1

    สั่งให้ทำงานเลย

    sudo /sbin/sysctl -p

     

    ที่มา:

  • 09Jul

    http://www.sourceguardian.com/protect_php_scripts.html
    http://www.zend.com/en/products/guard/

  • 08Jul

    หลายครั้งที่เราต้องการที่จะทำการ Ghost เครื่องคอมพิวเตอร์ที่ไม่มี CDROM หรือมี CDROM ชนิด SATA
    เมื่อ Boot ด้วย CDROM SATA หรือ USB CDROM พอเข้าสู่โปรแกรม Ghost กลับบอกว่าไม่พบ CDROM ทำให้ไม่สามารถ ghost harddisk ได้

    มาดูวิธีง่ายๆในการแก้ปัญหาดังกล่าว โดยการสร้าง Hiren USB Boot แล้วทุกอย่างจะง่ายขึ้นมาทันที
    (เฉพาะคอมพิวเตอร์ที่สามารถ boot ด้วย USB เท่านั้น)

    ที่มา: http://www.vecthai.com/forums/index.php?topic=483.0

  • 23Mar

    This tutorial describes how to set up database replication in MySQL. MySQL replication allows you to have an exact copy of a database from a master server on another server (slave), and all updates to the database on the master server are immediately replicated to the database on the slave server so that both databases are in sync. This is not a backup policy because an accidentally issued DELETE command will also be carried out on the slave; but replication can help protect against hardware failures though.

    In this tutorial I will show how to replicate the database exampledb from the master with the IP address 192.168.0.100 to a slave. Both systems (master and slave) are running Debian Sarge; however, the configuration should apply to almost all distributions with little or no modification.

    Both systems have MySQL installed, and the database exampledb with tables and data is already existing on the master, but not on the slave.

    I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

    Continue reading »

  • 22Mar

    1. Reboot router.
    2. When ROMMON is loading, send break signal on console port.
    3. confreg 0×2142
    4. reset
    5. enable, copy start run
    6. ***interfaces will be shut down!! make sure you ‘no shut’ them***
    7. conf t, change enable secret, line con/vty/aux passwords, usernames, etc.
    8. config-register 0×2102
    9. ^Z, write / copy run start
    10. reload, and make sure it’s happy.

  • 01Mar

    ต้องทำผ่าน Command Line นะครับ
    ตามรายละเอียดนี้ ต้องการดูทั้งหมดคลิ๊กที่ ที่มา นะครับ

    4.2.3. Creating VLANs

    For servers in a resource pool, you can use the pool-vlan-create command. This command creates the VLAN and automatically creates and plugs in the required PIFs on the hosts in the pool. See Section 8.4.22.2, “pool-vlan-create” for more information.

    To connect a network to an external VLAN using the CLI

    1. Open the XenServer host text console.
    2. Create a new network for use with the VLAN. The UUID of the new network is returned:

    xe network-create name-label=network5

    3. Use the pif-list command to find the UUID of the PIF corresponding to the physical NIC supporting the desired VLAN tag. The UUIDs and device names of all PIFs are returned, including any existing VLANs:

    xe pif-list

    4. Create a VLAN object specifying the desired physical PIF and VLAN tag on all VMs to be connected to the new VLAN. A new PIF will be created and plugged into the specified network. The UUID of the new PIF object is returned.

    xe vlan-create network-uuid= pif-uuid= vlan=5

    5. Attach VM VIFs to the new network. See Section 4.2.1, “Creating networks in a standalone server” for more details.

    ที่มา: http://docs.vmd.citrix.com/XenServer/5.5.0/1.0/en_gb/reference.html#networking-standalone_host_config-vlans

  • 14Nov

    โปรแกรม NTP Client ที่ฟรีและ update บ่อยมากๆ (ทุก 1 นาที)
    Download ได้ที่ ntp-4.2.4p7@copenhagen-o-win32-setup.exe

    รายชื่อ NTP server ในประเทศไทย
    th.pool.ntp.org
    ntp1.cat.net.th
    time1.nimt.or.th

    ที่มา: http://www.meinberg.de/english/sw/ntp.htm

« Previous Entries