SlideShare a Scribd company logo
1 of 121
Download to read offline
Fก Cloning FreeBSD 8.0 F                                            F                           1


                              ก กF          FreeBSD 8.0 & Authen

                              F                          F            F                           Fก
Cloning FreeBSD8.0 & Setup Authentications (                              CPU 32bit) F
             ก FreeBSDAuthen F F                                               FreeBSD & Authen
  F F         Fก      ˈ     F                                F

          ก                            ˁ        +    F              F      Fก
                Fก ก กF ก                        F              F FFก F
       F     กF    FFก F        F ˆ         F ˈ             ก F F F
                      ก ʾˉ           F (yim)        F        ก ก ก            F F
Config F                    F                ก        Service FreeBSD Server
     F     F           reboot , shutdown , reload squid F         PHP + Sudo
                      Fก         F                F           F
   F     Fก ก            ก FreeBSD              F
FreeBSD & Authen123 F
                                                          F F            Fก
         ( F     F       MSN             F)

              F                                  ก FreeBSD & Authen ก F    Fก
  Fก                      F            FF      ˆ                 F      ก Fก
  F                   F          F F             ก OPEN SOURCE F F ICT
                  F
                F ก Word F ก                  F ก
                                                                                              F
           F www.kroonis.org/SetupAuthen8.doc
                                                                     10 ก ก            2553

                                    F          F                                   www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                   ก         ก   F   ก     ˈ F
                                                                                                       .::
Fก Cloning FreeBSD 8.0 F                                           F                                                   2



                                  F ก กF           FreeBSD 8.0


       1.              F    F F      ก             Fก                /           F ก                            F
            ก ˁ Enter
       2.     ก          F           Fก ˁ Enter
       3.       ก Package             F ก     Fก ˁ Spacebar
       4.   ก       ก FF            nano Fก ˁ Ctrl + o (                 )       F                   ˁ Enter
       5.      ก กก กF F               nano Fก ˁ Ctrl + x
       6.            F     F o                  0           F



                                     Setup FreeBSD8.0

                        ก     ก FreeBSD8.0                                                   ˆ
PC ,       Server F    F Fก F     Onboard F F F                                                         ˆ
         FreeBSD F F กก ก F    Onboard ก F ก F กF ก F                                F           F                  Fก
     FreeBSD8.0 ก           F        F    F ʽ F       ( F                                                   F
ก F FF         ʽ F      F ก            F)

       1. Setup FreeBSD 8.0              F     F        F        FreeBSD 8.0 F F                                         ˈ
   F   F             2 F           FreeBSD8.0 #1            F Config 8.0 F F   Fก
FreeBSD 8.0
           1.1      F CMOS        F Boot ก CD-ROM กF      ( F        F ก F                                                    )
           1.2 ก          F F          F      F F   F CD / DVD ROM
           1.3              ก     FreeBSD 8.0     ก Boot           F    กF
         Country Selection F        ก ˈ 218 Thailand F ก ˁ Enter


                                     F          F                                        www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                ก     ก       F           ก            ˈ F
                                                                                                                             .::
Fก Cloning FreeBSD 8.0 F                           F                    3




           ก USA ISO      F ก ˁ Enter




           กก           Standard ก ˁ Enter




           ก ˁ Enter           ก
                                   F          F               www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.     ก   ก   F   ก   ˈ F
                                                                           .::
Fก Cloning FreeBSD 8.0 F                                   F                        4




              ก ˁ Enter           ก




              ก                           F           ˂ ก             Fก ˁ         D
              ก F




          ก         F F       F       ก       ˂   F     C   F ก ˁ Enter




                                   F          F                       www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก     ก   F   ก      ˈ F
                                                                                       .::
Fก Cloning FreeBSD 8.0 F                                   F                           5




                  ก ˁ Enter ก                      ก      F

              ˂   F Fก q           F F          Install Boot Manager for drive         F กก
         Standard ก ˁ Enter




                 F Message F             F Fก Create BSD partition        Fก ˁ Enter




                    F F ก      F                FreeBSD           Fก ˁ Enter 1
   F         F


                                   F          F                              www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                 ก   ก   F     ก    ˈ F
                                                                                              .::
Fก Cloning FreeBSD 8.0 F                                                 F                        6



                     /                                          512M
                   Swap             2 F             F           1G 2 F                       2048M
                  /home                                           5G
                   /tmp                                         500M
                   /usr                                          10G
                   /var                                 F


     1.   F        F   root Fก ˁ           C    ˂           F    Fก                          ˈ 512M
1G ก F        F         Fก ˁ Enter




                          1.1   ก         FS A file system               F ก ˁ Enter




                         1.2   F / ก ก ˁ Enter
                  2.   F F Swap Partition Fก ˁ     C                     ˂       F       Fก
     ˈ 2 F                   F          Fก ˁ Enter




                                    F          F                                         www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                    ก          ก       F   ก     ˈ F
                                                                                                      .::
Fก Cloning FreeBSD 8.0 F                                                            F                                      7




                   2.1 ก ˁ ก                     ก           Swap A swap partition.




            3. F    F       home          Fก ˁ       C            ˂        F       Fก                                   ˈ 5G




                   3.1                F           ก ˁ Enter
                   3.2        ก            FS A file system    F ก ˁ Enter
                   3.3            F       F /home    F ก ˁ Enter




          4. F          F
                        tmp        ˈ ก                   F            ก        F            F           F           F    F ก
      F F F           500M
                   4.1 Fก ˁ      C      ˂                     F           Fก                                ˈ 500M
           5. F F usr             ก F                                              F                          F F F 10G
                   4.1 Fก ˁ      C        ˂               F Fก                                               ˈ 10G
                   4.2 ก        FS A file                system    F ก ˁ Enter
                   4.3      F F /usr        F            ก ˁ Enter
                                    F                        F               www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868               :.               ก            ก        F   ก         ˈ F
                                                                                                                               .::
Fก Cloning FreeBSD 8.0 F                                                         F                              8

                  6. F        F           var       ˈ F        ก Log Files , Database           F F

                              6.1          Fก ˁ   C    ˂     F F ก ˁ Enter
                              6.2           ก    FS A file system     F ก ˁ Enter
                              6.3             F F /var    F ก ˁ Enter

          ก              Fก           q          ก กก F             (Fdisk)
      F       ก F                 F                6 F




               ก        Choose Distributions              F ก 4 , 5 , 6 , B Costom ( F          ก src       sys)




              ก                       [ x ] 4 Developer      ก ก ˁ Spacebar             ก                      F

                    ก                      F ก       ก ˈ [ x ] en               F




                                   F          F                                             www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                           ก       ก       F   ก         ˈ F
                                                                                                                   .::
Fก Cloning FreeBSD 8.0 F                               F                        9




           ก        Fก        OK F ก ˁ Enter ก       F ก                   F ก ก
F      5 Kern-Developer , 6 User       ก F     F F F
          ก           F ก Fก ˁ ก         B Custom F ก ˁ ก                        src




                  ก [ x ] sys /usr/src/sys (FreeBSD kernel)   Fก           ˁ OK

                                       F          F                    www.kroonis.org
    namo_nis@hotmail.com Mobile : 0-8335-26868 :.        ก    ก    F   ก   ˈ F
                                                                                       .::
Fก Cloning FreeBSD 8.0 F                                 F                                 10

              ก        F src ก           OK ก ˁ Enter ก        F                  ก ก
Fก             OK F ก ˁ Enter ก                  F ก
             ก      Fก         OK ก ˁ Enter           F F ก                       ก       F
F ก        1. CD / DVD Install from a FreeBSD CD/DVD ก ˁ Enter




           ก ˁ Enter         ก             กF             ก                       F Partition
               F




                  ก          ก       F F F F ก                    ก       F                   F F
     /usr/sbin/sysinstall        F   sysinstall ก F




                                   F          F                               www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.         ก       ก       F       ก     ˈ F
                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                          F                         11

                           ก F              Server       F ก Yes



                        F ก LAN F F ก F LAN                    ˈ              F                   F
   ก ISP              ก FreeBSD          ก F               F                  F dc0 , dc1       bge0
, bge1     Fก       F    ก F    ( ก ก F              em0                    F    ก              ก
      )




                -    F ก LAN     ก em0                   ก ˁ Enter F

                F ก No           F F IPv6




                F ก No           FF ก       ก        ก             FF




                                     F          F                                     www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก             ก         F   ก   ˈ F
                                                                                                   .::
Fก Cloning FreeBSD 8.0 F                                                      F                                             12

              ˈ       ก        F IP Address Fก ก F                  ก
           - Host :     F F         F ก          F authen.log.com               Fก                              Domain :
      ก            FF     F
           -ก            IPv4 Gateway :             F F Gateway             F                        F                     F F
           -ก            Name server :               F F DNS                    F                        F                  F F
           -ก            IPv4 Address :               FF      ก F                           ก F
203.172.188.130
           -ก            Netmask :           F F Netmask                F               F       F                         ipstar
    ก           ก ก         F F Netmsk 255.255.255.248 (            F                               F 6/4                  F)
                 F            F F          F       F F F ก              F F ก                                   F              F F

            F F ก        IPv4 Gateway   Name Server IPv4 Address     Netmask
             ADSL         192.168.1.1    192.168.1.1  192.168.1.1 255.255.255.0
           Leadline                     203.146.15.9              255.255.255.248
         ipstar samart                 203.192.33.34              255.255.255.248
          ipstar TOT     192.168.5.100 203.113.24.199 192.168.5.1 255.255.255.0

            -ก             OK




                                     F          F                                                            www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.               ก                     ก       F            ก          ˈ F
                                                                                                                                     .::
Fก Cloning FreeBSD 8.0 F                                                     F                     13

               Fก F                     1             F ก Yes




         F ก          F               Server ˈ Gateway        F ก Yes




          FF ก                    F   Network service that it Provides       F ก No




         F ก Remote                     F           Server       SSH         F ก Yes




          FF ก            F           FTP       anonymus      F ก No




          FF ก                F       NFS Server      F ก No




                                   F          F                                           www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                            ก      ก     F   ก   ˈ F
                                                                                                       .::
Fก Cloning FreeBSD 8.0 F                                F                   14

          FF ก     F NFS client        F ก No




                   F ก No




         F ก      F time zone         F ก Yes




                   F ก No




           ก            F         ก             Asia




                                   F          F                    www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.          ก   ก   F   ก   ˈ F
                                                                                .::
Fก Cloning FreeBSD 8.0 F                                                    F                   15

              ก                     44 Thailand         F ก ˁ Enter




        ICT look reasonable                 F ก Yes




                            F F ก       F         F     Linux           F   F ก Yes




                        F     F ก             Package           ก             F ก No




                  F F          F ก          F Account user          F       F ก Yes




                                   F          F                                        www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                           ก     ก    F   ก   ˈ F
                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                   F                   16

        User and group Management               F F ก F F F           F F F
˂ ก          Group      F ก ˁ Enter




          F F ก F F F       admin

                  - ก F F             (admin)




               ˂ ก            User      Add user   Fก




                                   F          F                       www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก     ก   F   ก   ˈ F
                                                                                   .::
Fก Cloning FreeBSD 8.0 F                                             F                                  17

Add User               F admin
                   -        F Login id: F F admin
                   -       F Group: F F admin
                   -     F Password:      F   F    admin     F ก                         ก            ˈ logserver
                   -    F Full name:        F     User
                   -      F Member groups: F F ก         F user              remote server            F F      F
         F wheel

                       ก ก F      F          F          Fก           OK




                 ก ก Adduser                       F         F    ˂ ก               X Exit this menu
           ก กก Adduser




                     F ˂              F          root             ก ก             F root          F         F Hack
     ก      F F ˂ EN F F                                F          F =k9b9hv dki8ofu      ก                   F
 F            F F                                         ( .....      .....    F ก      )
                                        F          F                                         www.kroonis.org
     namo_nis@hotmail.com Mobile : 0-8335-26868 :.                    ก        ก     F       ก   ˈ F
                                                                                                                   .::
Fก Cloning FreeBSD 8.0 F                                                         F                        18




        New password : ˂               F            root           F F
        Retype new password :                   F               root ก

                     F F ก            Package              กF     F F           ก                F ก No




        ก ก                F      sysinstall Main Menu                      F ก [ X Exit Install ]




       ก Yes     F     F       F CD        ก        ก                   reboot              กF       Boot




                                   F          F                                                  www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                           ก           ก   F        ก    ˈ F
                                                                                                              .::
Fก Cloning FreeBSD 8.0 F                                              F                                  19

            F ก login : F           root          ˂         F       root       Fก               F
FreeBSD 8.0 F     F             F          root       =k9b9hv dki8ofu                           F ก




           F      F    F   root ก F                   ก            F F                  ก                 F




             F    F 2 ˈ F Config 8.0 F                 F F CD-ROM F
          ns#    mount /cdrom                  F ก CD-ROM
          ns#    cd /cdrom/distfiles                 F      F CD-ROM F distfiles
          ns#    cp -rf * /usr/ports/distfiles            ก F         F F distfiles
          ns#    cd /cdrom/www/                    F         F www ก F CD-ROM
          ns#    mkdir /home/admin/www                  F     ก  www F /home/admin/
          ns#    cp -rf * /home/admin/www         ก F              F /home/admin/www/


                                    F          F                                            www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                     ก       ก        F       ก       ˈ F
                                                                                                              .::
Fก Cloning FreeBSD 8.0 F                            F                   20

ก กก    F       F CD-ROM        F   F Config 8.0   ก

            ns# mount /cdrom
            ns# cd /cdrom
            ns# cd /                         ก กก F CD - ROM
            ns# umount /cdrom            ก กก F CD-ROM




                                   F          F                www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.      ก   ก   F   ก   ˈ F
                                                                            .::
Fก Cloning FreeBSD 8.0 F                                                          F                                  21
                 Server F กF
           ˆ ก                      ก ก Ports             FF      ก           F Error-Code1 F Admin F
  F Time Zone                          ˈ ˆ                          F              F F      date ʾ .
       .           F            15/05/2553       12:30 F              F
          ns# rehash
          ns# date 201005151230
             F F         date               F FreeBSD Server                                         ˈ F ˆ
          ns# date
Update Ports Tree ก กF
                 F F Error-code1               F              F F                   F                          ก       update
ports tree F             F        F              ก(F         ก             F ThaiBSD)
                # portsnap fetch extract update
         ก update           F           F
                # portsnap fetch update
              F ports tree ก ˈ ˆ             F        ˆ      url                 F                       F F                      F
 กF ก                         F                         Fก                           F           +                       Server

               ก      nano               กF        F Config F
               ns# cd /usr/ports/editors/nano/
               ns# make install clean



                       F   F        Fก               OK F ก ˁ Enter                      F                             กF
       ก                   ก     nano

             ก         F FreeBSD      F ˆ                   F      ก      nano                                     F        F
 F         reboot    F F      rehash
                    ก F          nano


                                        F          F                                                       www.kroonis.org
     namo_nis@hotmail.com Mobile : 0-8335-26868 :.                        ก                  ก       F    ก        ˈ F
                                                                                                                                .::
Fก Cloning FreeBSD 8.0 F                                                      F                           22


          ก       F      nano        F F

              - F                   F ก ก ˁ Ctrl + w            F            F F               F ก         F

              -                       F ก         F nano +120 /usr/local/etc/squis/squid.conf
                  /usr/local/etc/squid/sqdiu.conf        F F ก        กF
                  +120                 F    F ʽ    F F               120



                                F          F            F                F             F

      1. config Nameserver
            ns# nano /etc/resolv.conf        F   F       DNS          F
        - F F             F        ipstar DNS   F 203.192.33.34 203.146.237.237
203.146.15.9
        - F F         F             ก     ก ก          DNS    F 203.146.15.10
203.146.237.237
        - F F           F          ipstar TOT      DNS     F 203.113.24.199
203.113.127.199
        - F F        F ADSL           DNS  F 192.168.1.1

              DNS ก F F F ก                            ก กก         กF         F resolv.conf
      2. Config System
          ns# nano /etc/rc.conf    F           F            Fก ก F                     2             F F
remote F            ก           **                 F           FF F                                F ก F **




                                    F          F                                               www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                       ก             ก       F   ก     ˈ F
                                                                                                               .::
Fก Cloning FreeBSD 8.0 F                                       F                      23




     F      ifconfig_ ก F            2= inet 192.168.212.1 netmask 255.255.255.0
                   กF ก F F F ก F rc.conf                  ก ˁ Ctrl + o        F Enter
    ก กก กF          Fก ˁ Ctrl + x
     3. Reboot Server        Fก กF F                   F ˈ ก
                ก กF           F        Fก ก F            2 F F reboot server
         ns# shutdown -r now             ก F Server Boot             F     F Login :
F ก Login F F            F root            Fก F     F F F
     4.        ก Boot            F Login F root F          F           F ipadress ก F
  F
         ns# ifconfig                        F F




             ก    F                   F   ก F       2

         -       ก em0     ก               ก      192.168.5.240               (     ก)
         -       2 em1     ก                      192.168.212.1               (     )


                                   F          F                           www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก      ก      F   ก       ˈ F
                                                                                         .::
Fก Cloning FreeBSD 8.0 F                                                 F                            24

            F     ก       F F               F  Server F              F F               ก F (Clients)
Remote F         config                  ก F Admin F                F F                Server F ก SSH



                                        ก       sshsecureshellclient-3.2.9
                F F CD-ROM F 2               F   F ก                       F       ˈ       F Config 8.0 F
  F             ก sshsecureshellclient-3.2.9.exe F F                  FF                           :-)

           1.             ก         ก   sshsecureshellclient-3.2.9.exe




           2.      ก ˁ                                      3.     ก ˁ

           4. ก ˁ                                           5.     ก ˁ

           6.      ก ˁ                                      7.     ก ˁ

           8.        กF         ก




                                    F          F                                            www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                    ก            ก       F    ก    ˈ F
                                                                                                            .::
Fก Cloning FreeBSD 8.0 F                                      F                     25


        9.   ก ˁ                         ก        F           F Desktop 2




                   F Remote Server                    F        ก     FTP




                                     ก       SSHSecureShellClient




                                   F          F                            www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.             ก     ก    F     ก   ˈ F
                                                                                        .::
Fก Cloning FreeBSD 8.0 F                                                                          F                                26

                                 Remote F                                               ก FreeBSD Server

                   F                 Cross -            F               F     F     ก - ( F F F F F Swicthing Hub)                              ก
F           LAN          2        F ก LAN                                   Clients        Notebook

                  1.                   ก                ก                                       SSHSecureShellClient-3.2.9.exe
        ʽ              F F             F ก ˁ Quick Connect




                  2.         ˂                    Host Name :                       F       F 192.168.212.1               F      ก ˁ

                                                                                                     admin         User
                                                                                                        ก                        FreeBSD 8.0



                 3. F              F ก Server                   F                         F F        F       User       ก                  F
            FreeBSD 8.0           F ก                               F           admin                    F    F logserver




                  4. F             F       F      ก F                                             F F Server FreeBSD                   F       su
    F
                        ns$: su
                                       passwd :             F               F      root

                                       F          F                                                                           www.kroonis.org
    namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                                        ก    ก      F    ก       ˈ F
                                                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                            F                                     27

 F          F       root ก F    ก        F F               #        F ˈ root        F

                    5.    ก ˁ New File Transfer Window


                6.
                ก SSH Secure File Transfer     ʽ       F F             ก F ก
  F ก    ก ftp               F F ˈ         ก F             F       ˈ      Server
ก      F   F ก ก F          F F F F F ก ก               F            F      ก
      ก Remote Server F    ก SSH            F http://www.npd.in.th/~manis

                               ก     F                     ก   vi                 Admin

                ก        กF    FF                       UNIX              F        vi                                     Fก     F
        F กF                                           ก F          Fก        ก

                 Fก ˁ                                            Fก ˁ
                  dd                                                r                                             F
                   i                               F               R                    F                                 กF     ก ESC
                :wq!                ก                  ก       : set nu
                   x                           ก                    a                                    F            F    ก Cursor
                  yy                ก                              :q                                        ก ก            ก
                   p                       Cursor              / string                     F                 F              F ก

                F         ก   CloningFreeBSD8.0 & Authen F                                           F             nano
                      Admin F F ก F         F ก ก F                                                 ก            Notepad              ก
        F           F F กFก F    vi




                                        F          F                                                                  www.kroonis.org
     namo_nis@hotmail.com Mobile : 0-8335-26868 :.                            ก             ก                F        ก    ˈ F
                                                                                                                                      .::
Fก Cloning FreeBSD 8.0 F                                                                            F                                 28


                                                     ก Compile Kernel

                               Compile Kernel          F       ก ก           F                Authen , QUOTA , ADSL ˈ F
     F       F             F

             ns# cd /usr/src/sys/i386/conf                                                    F        F           /usr/src/sys/i386/conf
             ns# cp /home/admin/www/WIFI8 ./                                                      ก            F /home/admin/WIFI8

                       ˈ                     ก   F WIFI8                                 F            F WIFI8                        F         options
 F               F               F     F F                 F                     F           FF         F                      F F                  F
29       F
                               F F Admin                   ก    F         F F ก                            F         options F

             # cd /usr/src/sys/i386/conf                            F                F
                                                                               /usr/src/sys/i386/conf
             # cp GENERIC WIFI8                                           ก F GENERIC ˈ           F F                                    WIFI8
             # nano WIFI8                                               F  F    options F
* F            F                      F *

                     ident                        WIFI8
                     options                      IPFIREWALL
                     options                      IPFIREWALL_FORWARD
                     options                      IPFIREWALL_DEFAULT_TO_ACCEPT
                     options                      IPFIREWALL_VERBOSE
                     options                      IPFIREWALL_VERBOSE_LIMIT=120
                     options                      IPDIVERT
                     options                      ALTQ
                     options                      ALTQ_CBQ
                     options                      ALTQ_RED
                     options                      ALTQ_RIO
                                    F          F                                                                           www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                                    ก              ก     F   ก             ˈ F
                                                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                           F                   29

      options            ALTQ_HFSC
      options            ALTQ_PRIQ
      options            ALTQ_NOPCC
      device             pf
      device             pflog
      device             pfsync
      #ADSL Manis
      options            NETGRAPH
      options            NETGRAPH_ASYNC
      options            NETGRAPH_BPF
      options            NETGRAPH_ECHO
      options            NETGRAPH_CISCO
      options            NETGRAPH_FRAME_RELAY
      options            NETGRAPH_HOLE
      options            NETGRAPH_IFACE
      options            NETGRAPH_LMI
      options            NETGRAPH_MPPC_ENCRYPTION
      options            NETGRAPH_PPP
      options            NETGRAPH_PPTPGRE
      options            NETGRAPH_RFC1490
      options            NETGRAPH_KSOCKET
      options            NETGRAPH_TEE
      options            NETGRAPH_TTY
      options            NETGRAPH_UI

      options            NETGRAPH_VJC
      options            NETGRAPH_ETHER
      options            NETGRAPH_SOCKET

                                   F          F               www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.     ก   ก   F   ก   ˈ F
                                                                           .::
Fก Cloning FreeBSD 8.0 F                                          F                                            30

       options                NETGRAPH_PPPOE
       options                HZ=1000

  ก      F ก ˁ Ctrl + o     F ˁ Enter      ก กก กF ก ˁ Ctrl + x
      # config WIFI8
      # cd ../compile/WIFI8
      # make cleandepend;make depend;make;make install

             ก Compile kernel F    NAT Authen FIREWALL                                  F
         (     30 - 40 ) F      กF       compile kernel                                     F     F          F

      # nano /etc/rc.conf      F               *** F      F                                               F ***

       firewall_enable="YES"
       firewall_type="OPEN"
       firewall_quiet="YES"
       natd_enable="YES"
       natd_interface="em0"         // em0      ก F               ก F       ก               F ก
       natd_flags="-s -u -m"

       pf_enable="YES"
       pf_rules="/etc/pf.conf"
       pf_flags=""
       pflog_enable="YES"
       pflog_logfile="/var/log/pflog"
       pflog_flags=""

          กF         F /etc/rc.conf ก F       F F ก         ก กก กF
           F boot               F   F        reboot ก Enter    boot                                   F          F
        F      F kernel F                      F    uname -a        F

                                   F          F                                     www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                 ก         ก       F   ก           ˈ F
                                                                                                                     .::
Fก Cloning FreeBSD 8.0 F                                              F                         31

     ns# uname -a
     FreeBSD ns.authen123.com 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Apr 6
     11:13:15 ICT 2010 admin@ns.authen123.com:/usr/src/sys/i386/compile/WIFI8 i386
     ns#



                      ก        FAMP 8.0 (Mysql50 + Apache22 + PHP5)


         ก       F        UNIX F F           F                ก F        F 2-3
             ก       ก ˁ TAB FreeBSD             F                   F

        ก       ก F          Server F FreeBSD                                                   ก
    FAMP                    ก FreeBSD F
     1. Setup Perl5.8
     ns# cd /usr/ports/lang/perl5.8
     ns# make config          ก Options




    ก           OK F ก ˁ Enter
    ns# make install && make clean                       //         กF                    Perl5.8
   ก F      F ..... Clearning .... perl5.8           F          F             F F 2




                                   F          F                                       www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                   ก        ก       F    ก   ˈ F
                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                   F                                 32

        2. Setup Mysql50

       ns# cd /usr/ports/databases/mysql50-server
       ns# make WITH_CHARSET=tis620 WITH_XCHARSET=all
       WITH_COLLATION=tis620_thai_ci WITH_OPENSSL=yes
       BUILD_OPTIMIZED=yes WITH_ARCHIVE=yes WITH_FEDERATED=yes
       WITH_NDB=yes install clean
                make WITH_CHARSET=tis620 F           ก ก F Authen8.doc
         F          F F F F F         F Config 8.0 F        F F SSH      F                                  ก
                  F       ก F      FF             F                    F

                              ก        ก        ก    F Authen8.doc             FF ก                     ก
Microsoft Word          F ʽ       F Authen8.doc          F       ก               F

 ʽ       ก     SSH Secure Shell Client                   F             F
        1.     ก ˁ                             F ˂           F     ก       F ก Server




        2. F       FF         ก     F ก F            ก           SSH Secure Shell Client        F ˂             F
 F F




                                    F          F                                            www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                             ก      ก     F   ก     ˈ F
                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                 F                        33

    3. F        F    F   admin ก F                F F               ก Server     F




           ก ˁ OK F         กF                    $           F F F        F F
   F F      F admin              F     su               ˈ root F




    4.      F       su   F ก ˁ Enter




                                   F          F                       www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.     ก         ก   F     ก   ˈ F
                                                                                     .::
Fก Cloning FreeBSD 8.0 F                                                           F                        34

       5.   F               F        root F ก F          FreeBSD 8.0 ก                    F F F admin
  ˈ root F                             F root ก          ก           root                  ก          $ ˈ
          # F




        6. F                    ก          F Authen8.doc                                  ก F ก               F ก
                    ก           SSH Secure Shell Client (                        Fก ˁ Alt + Tab ˈ                   F
    ก                   F         ก      ʽ F Windows)
                 6.1          ก ˁ
                 6.2              กF         ก              F   ก F ก F        ก SSH
Secure Shell Client             F    ก         ก F    F           F F   F             F
     ก FF                   ก        ก F Authen8.doc      F F         ก SSH Secure Shell
Client ก ก F                ก ˁ        F                    Admin F    F F
   F ก         F                            ก F         F




                                 F                   F             ก          SSH Secure Shell Client
         F      F       F F              ก F              F         F                          ก         กก F             F
     ก F                             ก         ก F             F            F           F

               กF                Mysql50                                F   F FAMP 8.0             F   F CD-ROM
                        ก Mysql50 F                           FF                ก              ก ports ก      F

                                     F          F                                                  www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                   ก       ก    F   ก    ˈ F
                                                                                                                        .::
Fก Cloning FreeBSD 8.0 F                                                         F                                      35

                  ก                F ก                  F                   15 -25                                 ก             F


         This port has installed the following startup scripts which may cause
         /usr/local/etc/rc.d/mysql-server           //        start / stop mysql-server
         ===> Cleaning for mysql-server-5.0.45_1
         ns#

             F        mysql_enable="YES" F        F /etc/rc.conf
          ns# echo mysql_enable= YES >> /etc/rc.conf
          ns# reboot                    restart server          F mysql50                                                  F

                 ก F F Server       F F     F       F

            # /usr/local/bin/mysqladmin -u root password                F         F mysql root                         F

            # /usr/local/bin/mysqladmin -u root password dkil7dkk=k9b

                   ก       F   F    mysql       F           กก                                                 F F SSH

         ns# mysql -u root -p'dkil7dkk=k9b' // dkil7dkk=k9b                                               rootmysql
         Welcome to the MySQL monitor. Commands end with ; or g.
         mysql>

             F         F    F radius , syslog   ก                              F root         F            F     radius , syslog
 F           F     F dkil7dkk=k9b (         F ก                                   F F             F            ก            ก
กF          F Config F        F     ก ก F                        Fก F                   F F
     F




                                    F          F                                                                www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                ก          ก            F        ก           ˈ F
                                                                                                                                 .::
Fก Cloning FreeBSD 8.0 F                                               F                              36

     mysql> create database radius;            //       F           F           F radius
     Query OK, 1 row affected (0.00 sec)
     mysql> create database syslog;            //           F           F       F syslog
     Query OK, 1 row affected (0.00 sec)

     mysql> grant all on radius.* to root@localhost identified by 'dkil7dkk=k9b';
     //     ก            Fก F F          F   radius        ก         F root       F
          F    radius ก               F F      F     radius dkil7dkk=k9b

     mysql> grant all on   syslog.* to root@localhost identified by 'dkil7dkk=k9b';
     //     ก               Fก F F         F    syslog         ก         F root     F
          F    syslog        ก           F F       F     rdius dkil7dkk=k9b
     mysql> exit //           F     exit      ก ก F              ก Mysql

      3.           ก Apache22         F ก www
      ns# cd /usr/ports/www/apache22
      ns# make config
          Fก     ก Fก ˁ Spacebar          F   1                                      ก             F ก
   [ * ] MYSQL F ก               OK ก ˁ Enter




      ns# make install && make clean

          กF        ก                      F  F F        F     F                F
  Fก ˁ Spacebar         ก F            F ก ˁ Tab       OK ก ก ˁ Enter ( F                          ก
             10 20 )               ก               F    F config    ก Apache22                         F
F /usr/local/etc/apache22            F         F     F กF        Fก       F F F
 F /var/www/html/           F   ก path           ก          ก         ก F F
                                   F          F                                          www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                   ก           ก    F       ก   ˈ F
                                                                                                           .::
Fก Cloning FreeBSD 8.0 F                                                   F                               37

                F กF    F httpd.conf

            F             F ก       F                   shellscipt           F Config Fก apache22

      ns# nano /root/apache22.sh                                                         F           F

      #!/bin/sh
      kldload accf_http
      mkdir /var/www
      mkdir /var/www/html
      sed -i '' 's,DocumentRoot "/usr/local/www/apache22/data",DocumentRoot
      "/var/www/html",g' /usr/local/etc/apache22/httpd.conf
      echo accf_http_load="YES" >> /boot/loader.conf
      /usr/local/sbin/apachectl start
      echo apache22_enable="YES" >> /etc/rc.conf

         F    sed -i s, F               ,       F   F                 ,F g           F           F
       sed -i    F FFก          ˈ

          ก F         ก กก กF         ก                      F       F apache22.sh
      ns# chmod 775 /root/apache22.sh
      ns# sh /root/apache22.sh

        ʽ        ก Internet Explorer        F       F 192.168.212.1                                  ก
  ก         Apache22




                                   F          F                                                      www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                          ก        ก            F       ก   ˈ F
                                                                                                                  .::
Fก Cloning FreeBSD 8.0 F                                     F                                 38


                F Apache22         F User F            F F
         # cd /usr/local/etc/apache22/Includes
         # nano user_dir.conf                           ก        F       F                 F F SSH

         <IfModule mod_userdir.c>
         UserDir public_html
         <Directory /var/www/html/*>
         AllowOverride FileInfo AuthConfig Limit Indexes
         Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
         <Limit GET POST OPTIONS PROPFIND>
         Order allow,deny
         Allow from all
         </Limit>
         <LimitExcept GET POST OPTIONS PROPFIND>
         Order deny,allow
         Deny from all
         </LimitExcept>
         </Directory>
         </IfModule>


4.         PHP5                    ก FreeBSD8.0
         ns# cd /usr/ports/lang/php5
         ns# make config             ก F         ก [ * ] APACHE F            F       F ก
            PHP error F save ... Files                         F                                 F F




                                        F          F                                 www.kroonis.org
     namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก       ก           F   ก     ˈ F
                                                                                                       .::
Fก Cloning FreeBSD 8.0 F                                                      F                   39




      ns# make install clean
     กF          PHP5          F    F F      ก FF      ก            Fก
   OK             ก       PHP5          F  F  php5-extensions F F
      # cd /usr/ports/lang/php5-extensions
      # make config
  F ก ˆ กF F       BZ2 , CALENDAR , CTYPE , CURL , DOM , EXIF , FILETNFO ,
FILTER , FRIBIDT , FTP , DG , GETTEXT , IMAP , MBSTRING , MYSQL , ODBC ,
OPENSSL , PCRE , PDF , PDO , PDO_SQLITE , POSIX , SESSION , SIMPLEXML ,
SOCKETS , SPL , SQLITE , TOKENIZER , XML , XMLREADER , XMLWRTTER , ZIP ,
ZLIB

                  ก        F ก         OK ก ˁ Enter                         F
            # make install && make clean

             F            F F                ก FF      ก F              ก ก F Fก
      OK                        กF                  php5-extention                F           F 20 -30
  F        Fก F F ก                                    ก F         Cleaning ...... php5-extensions

                      F          F php.ini      F php5                  F

               F    ก F php.ini ก /home/admin/ConfigWWW/php5/php.ini
            ns# cp /home/admin/www/ConfigWWW/php5/php.ini /usr/local/etc/
                  F กF    F php.ini F F   F    F      F F กF

          5.        F Apache22 F F กก PHP5
          # nano /usr/local/etc/apache22/httpd.conf
      F F    index.html            F F F index.php กF                       index.html
                                    F          F                                                 www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                  ก    ก       F   ก   ˈ F
                                                                                                              .::
Fก Cloning FreeBSD 8.0 F                                      F                              40

          DirectoryIndex index.php index.html        //           F index.php กF           index.html
 F              AddType application/x-compress .Z       F            F         F
         AddType application/x-compress .Z
       ก       3                    F F SSH
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps
        AddType application/x-httpd-php .html

       ก     F httpd.conf      ก       F F     F test.php F www
           ns# echo '<? phpinfo(); ?>' > /var/www/html/test.php

           ns# /usr/local/sbin/apachectl stop

           ns# /usr/local/sbin/apachectl start

                     ก        F test.php     ก       ก F F PHP5                        F       F
192.168.212.1/test.php          F        F       F




                                        F          F                               www.kroonis.org
     namo_nis@hotmail.com Mobile : 0-8335-26868 :.            ก         ก     F    ก          ˈ F
                                                                                                        .::
Fก Cloning FreeBSD 8.0 F                                                      F                               41

                                           ก           F      echo
              ก       echo          F 40

            echo '<? phpinfo(); ?>' > /var/www/html/test.php

            F      echo     F        F /var/www/html/test.php                    ก                   F test.php
<? phpinfo(); ?>
              -                 >              F           echo              F                                   F
 F     F        ก F F
                F               F F F
              -                 >>                 F       echo      ก                   F                   F



                          Setup Authentications & Wifi Hostpot

1. Setup Freeradius2 + Setup Coovachilli
      ns# cd /usr/ports/net/freeradius2
      ns# make rmconfig-recursive       //      F     ก F F       F F กF                                             ก
      ns# make config
   ก Options            USER , MYSQL , PERL , PYTHON , DHCP EXPERIMENTAL
   ก       Fก        OK F ก ˁ Enter




                                     F          F                                                www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                          ก           ก       F   ก     ˈ F
                                                                                                                     .::
Fก Cloning FreeBSD 8.0 F                                                     F                                          42

           ns# make install && make clean
        กF               Freeradius2                       ก F
         http://www.freeradius.org/
         ===> Cleaning for freeradius-2.1.8_1

2. Setup Coovachilli
         ns# cd /usr/ports/net-mgmt/coovachilli/
         ns# make install && make clean
        กF              Coovachilli              ก F
         http://www.coova.org/
         ===> Cleaning for coovachilli-1.0.12_1

               ก         Freeradius2 , Coovachilli                   F       F       F Config Files F
radiusd , Coova                      F

                   ก           ก                 F F                     F   (Web Mangement)
         ns# cd /home/admin/www
         ns# cp -rf * /var/www/html/
        กF           ก       ก F                                  F    rootmysql        ก                                    F
      F dkil7dkk=k9b F F ก                             F     rootmysql ˈ         F Admin F ก                                     F
  F
          ns# mysql -u root -p dkil7dkk=k9b

          Mysql> grant all on radius.* to root@localhost identified by                                   F              F;
          Mysql> grant all on syslog.* to root@localhost identified by                               F                  F;
          Mysql > exit


                   ก ก        ก    Mysql     F             F F   F               ก   Mysql               Fก         F
rootmysql                 F
                                     F          F                                                www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                              ก       ก       F   ก            ˈ F
                                                                                                                                     .::
Fก Cloning FreeBSD 8.0 F                                                   F                            43

      ns# mysql -u root -p                          rootmysql          F

      ก                           F   F         ก   Mysql   F




                  F                         F   radius F      ก phpMyAdmin
          F                                 F F      ก Internet Explorer ก         F 192.168.212.1/db
 ก F                      ʽ               ก phpMyAdmin2.10.3          F    F F F         F root
  F F                                      ก F dkil7dkk=k9b F ก ˁ Enter (        F         ก ก        )




                  ก           F         radius ก         F   F  ก F ก                    ก          Import
  F           F       F                    Freeradius2 F ก ก F Config 8.0                    F radius.sql F
ก ˁ                                   F        ก      F    F       18                            F     F




                                   F          F                                               www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                              ก    ก    F        ก    ˈ F
                                                                                                              .::
Fก Cloning FreeBSD 8.0 F                                                     F                                       44

           F         F Config Freeradius2
          FF                                      F Shellscript           F radius.sh           F F F

    ns# nano /root/radius.sh                      ## F            ก         F       F                         F F SSH

     #!/bin/sh
     echo "######################################"
     echo "Script Config Freeradius2 By Manis Slangsingha"
     echo "#######################################"
     cp /home/admin/www/radius2/clients.conf /usr/local/etc/raddb/
     cp /home/admin/www/radius2/sql.conf /usr/local/etc/raddb/
     cp /home/admin/www/radius2/radiusd.conf /usr/local/etc/raddb/
     cp /home/admin/www/radius2/default /usr/local/etc/raddb/sites-available/
     cp /home/admin/www/radius2/dialup.conf /usr/local/etc/raddb/sql/mysql/
     echo 'radiusd_enable="YES"' >> /etc/rc.conf
     /usr/local/etc/rc.d/radiusd start
     echo "######################################"
     echo "Create Config Files Freeradius2 Finish"
     echo "#######################################"

    ns# chmod 775 /root/radius.sh
    ns# sh /root/radius.sh
          F Freeradius2 ก F                   F

                Admin                    F FF ก                           ก F                       F F
                            F กF    F Config radiusd                                        F             F     F
               ( F        radius.sh F ก F F                 )

     ns# sed -i -e s,testing123,wifi,g /usr/local/etc/raddb/clients.conf
       F     sed F       F      testing123 F          F secret F ก                                    ˈ             F wifi
                                   F          F                                                 www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                         ก         ก       F       ก         ˈ F
                                                                                                                         .::
Fก Cloning FreeBSD 8.0 F                                        F                             45

     ns# nano +683 /usr/local/etc/raddb/radiusd.conf
           # F             ก
    #$INCLUDE sql.conf                                        กF   กF
    $INCLUDE sql/mysql/counter.conf                                กF
     ns# nano +38 /usr/local/etc/raddb/sql.conf
           login= root
           password=      rootmysql                F F




     ns# nano + 148 /usr/local/etc/raddb/sites-available/default        กF       F




                    # F           unix         files
                   # ก F                 sql




                                   F          F                                      www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.             ก        ก         F       ก   ˈ F
                                                                                                  .::
Fก Cloning FreeBSD 8.0 F                                         F                   46

                  #         ก F                 daily
              F F         F ก
           expiration
           logintime
                   F F F            ก                   F   F
           expire_on_login
           noresetcounter
           dailycounter
           monthlycounter




                      #         F       unix



                  #         F           files




                                   F          F                             www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                   ก   ก   F   ก   ˈ F
                                                                                         .::
Fก Cloning FreeBSD 8.0 F                                   F                              47

                   # F            unix
                   # F            radutmp
                  # ก F              sql




                    #        F      radutmp
                   #        ก F        sql

     ก       ก              F F case sensitive F F F              F user       ก     F   F
F ก F กF          ( F ก                      F )
   ns# nano +81 /usr/local/etc/raddb/sql/mysql/dialup.conf




                                        กF กF
         F              #    F       82 89 F ก       กF




                                              กF


                                   F          F                            www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.             ก   ก    F       ก   ˈ F
                                                                                             .::
Fก Cloning FreeBSD 8.0 F                                          F                      48

          F            The default queries are case insensitive       F            # FF      F
        93 - 100




                                                                                  กF   กF




                                                                                       กF

          F            group_membership_query = "SELECT groupname
F                  # F     F     103 - 106 ก




                                                กF    กF



                                                      กF

                                                กF
          F            simul_count_query = "SELECT COUNT(*)
    F              #   F         ก




                                                กF    กF
                                   F          F                                   www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                     ก       ก   F   ก    ˈ F
                                                                                                 .::
Fก Cloning FreeBSD 8.0 F                                        F                        49




                                             กF
                        F /etc/rc.conf
      ns# echo radiusd_enable="YES" >> /etc/rc.conf
      ก         F Freeradius2            F
      ns# /usr/local/etc/rc.d/radiusd start
               F radiusd          Fก       F Mysql F
      # radiusd -X
            ก        ก                 F F   ก                 F F SSH
      ns# radtest a1 12345 localhost 0 wifi
  F ก                  F F radiusd            Fก     F F       ก       F       radius F F
   F ก




                                   F          F                                www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.              ก       ก       F   ก   ˈ F
                                                                                            .::
Fก Cloning FreeBSD 8.0 F                                                F                            50

                       F     F Config      CoovaChilli

                  F
                 F Shellscript                   ก     F Config Coovachilli            กF        F     F
  F ( F F F ConfigAuthen8.0                          Server F ) ก                 LAN ˈ
192.168.212.0/24
         ns# nano /root/coova.sh

          #!/bin/sh
          echo "######################################"
          echo "Script Config Coovachilli By Manis Slangsingha"
          echo 'kern.ipc.msgseg=16000' >> /boot/loader.conf
          echo 'kern.ipc.msgmnb=16000' >> /boot/loader.conf
          touch /usr/local/etc/chilli/hs.conf
          touch /usr/local/etc/chilli/local.conf
          cp /home/admin/www/coova/defaults /usr/local/etc/chilli/
          cp / home/admin/www/coova/main.conf /usr/local/etc/chilli/
          echo 'coovachilli_enable="YES"' >> /etc/rc.conf
          echo 'coovachilli_flags="--coaport 3779 --conf /usr/local/etc/chilli.conf"' >> /etc/rc.conf
          echo "######################################"
          echo "Create Config Files Coovachilli Finish"
          echo "#######################################"

          # chmod 775 /root/coova.sh
          # sh /root/coova.sh

             กF          F /usr/local/etc/chilli/defaults         F                         F         F F F
      F               LAN F Server                   ก F ก F



                                    F          F                                       www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                        ก       ก    F   ก        ˈ F
                                                                                                           .::
Fก Cloning FreeBSD 8.0 F                                           F                    51

         ns# ifconfig -a                                 F   LAN ก                 F ก




                - em0 ก                  F ˈ ก F             ก (WAN)
                - em1 ก                 F ˈ ก F               (LAN)

           F     sed F         F        กF     ก F                   ก F               Server
            dc1
         ns# sed -i -e s,em1,dc1,g /usr/local/etc/chilli/defaults
         ns# sed -i -e s,em1,dc1,g /usr/local/etc/chilli/main.conf

    F     ก Coovachilli              F
         ns# /usr/local/etc/rc.d/coovachilli start

          กF                       ก    . 2 F        ก        ก Freeradiusd2      F             F
     กF            ก .                     F  F        rootmysql dkil7dkk=k9b F F
rootmysql ก                F       กF     F F        F กF       Fก F        F



                                    F          F                                   www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                       ก     ก   F   ก     ˈ F
                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                      F                      52

                   # chmod 777 /var/www/html/admin/upload
                   # chmod 777 /var/www/html/bsex.txt
                   # /usr/local/www/lightsquid/lightparser.pl

 กF           Fก           mrtg         Fก              Server ˆ

               ns# cfgmaker public@localhost> /usr/local/etc/mrtg/mrtg.cfg
  ก           กF config       F mrtg.cfg
                  ns# nano /usr/local/etc/mrtg/mrtg.cfg F        F

                            WorkDir: /var/www/html/show/
                            Options[_]:growright,bits

indexmaker --columns=1 --output=/var/www/html/show/index.html /usr/local/etc/mrtg/mrtg.cfg

          F          F      F ˈ                              F ก ˁ Enter
                   F mrtg.cfg 3              Fก              Error F ก F F

                         ns# mrtg /usr/local/etc/mrtg/mrtg.cfg

      F       Fก           mrtg                     F              F Crontab

                         ns# nano /etc/crontab                                          F           F          F

                            */5 * * * * root /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg

                          Fก mrtg         ก        F (update) ก 5
(http://www.thaibsd.com/webboard/show.php?Category=thaibsd&No=11781)

                     F ก F               F Authen        F          F reboot server F
               # reboot

                                     F          F                                                   www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                ก            ก   F   ก   ˈ F
                                                                                                                   .::
Fก Cloning FreeBSD 8.0 F                                           F                        53

                          Admin               ก          F F ก กF F Config                      F กF   F
                            F
                   ns# echo 'kern.ipc.msgseg=16000' >> /boot/loader.conf
                   ns# echo 'kern.ipc.msgmnb=16000' >> /boot/loader.conf

     F              ก       F      F Config Coova
         ns#       cp /usr/local/share/examples/coovachilli/main.conf.sample /usr/local/etc/chilli/main.conf
         ns#       touch /usr/local/etc/chilli/hs.conf
         ns#       touch /usr/local/etc/chilli/local.conf
         ns#       nano +14 /usr/local/etc/chilli/defaults
กF             F               ก F           LAN

                   HS_LANIF=dc1               # Subscriber Interface for client devices
                   # กF       HS_LANIF=eth1 ˈ HS_LANIF=                 ก F        2 (LAN)
                   HS_NETWORK=192.168.212.0 # HotSpot Network (must include HS_UAMLISTEN)
                   HS_NETMASK=255.255.255.0 # HotSpot Network Netmask
                   HS_UAMLISTEN=192.168.212.1 # HotSpot IP Address (on subscriber network)
                   #                    F ก     ก 10.1.0.0        10.1.0.1 ˈ             F
                   HS_UAMPORT=3990           # HotSpot Port (on subscriber network)
                   # กF F F
                   HS_UAMSECRET= ht2eb8ej6s4et3rg1ulp
                   HS_RADIUS=127.0.0.1
                   HS_RADIUS2=127.0.0.1
                   HS_RADSECRET=wifi
                   HS_UAMALLOW=192.168.212.0/24
                   HS_UAMSERVER=192.168.212.1
                   HS_UAMFORMAT=http://$HS_UAMSERVER/hotspotlogin.php
                   HS_UAMHOMEPAGE=http://$HS_UAMLISTEN:$HS_UAMPORT/prelogin
                   HS_UAMSERVICE=http://$HS_UAMSERVER/hotspotlogin.php

                                    F          F                                          www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                           ก       ก    F   ก     ˈ F
                                                                                                           .::
Fก Cloning FreeBSD 8.0 F                                  F                       54

         HS_WWWDIR=/var/www/html
         HS_WWWBIN=/usr/local/etc/chilli/wwwsh

          กF      F /usr/local/etc/chilli/main.conf   ก       F       F
         # nano /usr/local/etc/chilli/main.conf
         cmdsocket /var/run/chilli.sock
         pidfile /var/run/chilli.pid
         net        192.168.212.0/255.255.255.0
         uamlisten 192.168.212.1
         uamport 3990
         dhcpif      dc
// กF    dc1 ˈ ก F                     ( LAN)
         adminuser chillispot
         adminpasswd chillispot

         uamallowed 192.168.212.0/24
         uamdomain .pm.int
         uamdomain .authen123.com
         uamdomain .avast.com
         uamdomain .free-av.com
         uamdomain .eset.co.th
         uamdomain .eset.com
         uamdomain .malwarebytes.org
         uamdomain .update.microsoft.com
         uamdomain .mozilla.com
         #domain lan
         dns1 192.168.212.1
         dns2 8.8.8.8

                                     F          F                             www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก       ก       F   ก   ˈ F
                                                                                           .::
Fก Cloning FreeBSD 8.0 F                                       F                     55

     uamanydns
     #nodynip
     statip 192.168.212.0/24
     dynip 192.168.212.0/24
     dhcpstart 20                   //      F Coova ก            F 192.168.212.20-254
     dhcpend 254                   // F        192.168.212.2-192.168.212.19 F Fix ip    F

     uamhomepage http://192.168.212.1:3990/prelogin
     uamserver http://192.168.212.1/hotspotlogin.php
     uamsecret ht2eb8ej6s4et3rg1ulp
     radiussecret wifi
     radiusserver1 127.0.0.1
     radiusserver2 127.0.0.1
     radiusauthport 1812
     radiusacctport 1813
     radiusnasid nas01
     radiuslocationid isocc=,cc=,ac=,network=Coova,
     radiuslocationname My_HotSpot
     locationname "My HotSpot"
     wwwdir          /var/www/html
     wwwbin          /usr/local/etc/chilli/wwwsh
     coaport 3779

       F กF     ก F       F    ก     F          ก กก   กF

         F CoovaChilli           F
    ns# /usr/local/etc/rc.d/coovachilli stop
    ns# /usr/local/etc/rc.d/coovachilli start
                     F Starting coovachilli
                                   F          F                            www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.               ก     ก    F   ก   ˈ F
                                                                                            .::
Fก Cloning FreeBSD 8.0 F                                         F                          56

       ns# ifconfig -a                     ก F Coovachilli F                     F   Coova
          F TUN0 ก           F           192.168.212.1 Fก ก F                 2 ( LAN) F
                             FF ก           F       Fก ก F




         กF ˆ         ก F        F     F Fix ip
                        Fก F F         ก F       F      F Printer Network F F Fix ip F
    F F         192.168.212.2-192.168.212.19 F F            F Coovachilli    ก        กF F
      /usr/local/etc/rc.d/coovachilli stop         ก Fix ip           F      F Coovachilli
   Fก F               /usr/local/etc/rc.d/coovachilli start         F ก กF ˆ    Coovachilli ก
  ก F         F               ˈ F Fix ip

                F        ก              ก         F F             F
         F Admin F Fก               F     rootmysql ˈ dkil7dkk-v =k9b             F กF       F
rootmysql F ก F ก     FF                ( ก F //var/www/html)

       1. กF        F admin/include/config.inc.php           Fก           F       radius


                                    F          F                                    www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.               ก        ก       F    ก       ˈ F
                                                                                                 .::
Fก Cloning FreeBSD 8.0 F                                        F                               57

             ns# nano /var/www/html/admin/include/config.inc.php
    <? php
             # configuration for database
             $_config['database']['hostname'] = "localhost";
             $_config['database']['username'] = "root";
             $_config['database']['password'] = " F rootmysql ";

          $_config['database']['database'] = "radius";
         ก F config.inc.php           ก กก กF

    2. กF       F log/ Connections/ dbconnect.php      Fก                  F           radius
    ns# nano /var/www/html/log/Connections/dbconnect.php
    <?php
    $hostname_syslog = "127.0.0.1";
    $database_syslog = "radius";
    $username_syslog = "root";
    $password_syslog= " F rootmysql";
         ก F config.inc.php           ก กก กF

    3. กF       F syslog/ Connections/ dbconnect.php      Fก                   F          radius
    ns# nano /var/www/html/syslog/Connections/dbconnect.php
    <?php
    $hostname_syslog = "127.0.0.1";
    $database_syslog = "radius";
    $username_syslog = "root";
    $password_syslog= " F rootmysql";

         ก     F config.inc.php        ก กก       กF



                                   F          F                                    www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.            ก         ก   F           ก      ˈ F
                                                                                                   .::
Fก Cloning FreeBSD 8.0 F                                                      F                          58

                  ก          F                   ก       .
        1. F ก                                       Clients F ก F           F        F radius.sql              F
    F ก ก                F           F       Address      F 192.168.212.1/admin

           2. Login F F                           ก ก F         F   Login : admin password : passwd




       ก         ก                       ก      Web Mangement




              กF F F      F
            1. ก     ก กF F F

            2. ก ˁ                                           ก F F F              F                  ก
ก      F             F           F                   ,                    F
                                       F          F                                                  www.kroonis.org
    namo_nis@hotmail.com Mobile : 0-8335-26868 :.                             ก          ก     F     ก   ˈ F
                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                                 F                         59

          3. ก ก             ก ก ก F F F                           F               F




       F Attribute
      F F                             F F                      F        F ˈ                ก         F
                              ก F F F (                     F Attribute Expire-After)
      F     F                        F F                        F     ˈ                   ก        F
                              ก F F F (                    F Attribute Max-Daily-Session)
      F     F               Max-Monthly                           F F       F   ˈ
                             ก         F ก F                 F F ( F Attribute -Session
                F   F               F F                       F                     F F ก F F
                                          ก                         F ก F F F ( F Attribute Max-All-
                            Session

           FF           ก            F ก F F F                         F                   F           ˈ
           ก Fก F            F           ˁ F   ( F                         ก F F F                             )
             ก ก                         F         F ก ˁ                   ก               ก               กก F F F
  F        radius F ก            ʽ   F       ก F           F                           F

                                   F          F                                                            www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                  ก               ก   F       ก       ˈ F
                                                                                                                         .::
Fก Cloning FreeBSD 8.0 F                                                       F                                 60




      F F ก กF                                  ก F     F F ก                     F ก               ก F         F ก
       ก   ก F F F               F        F           ก ก F                                     F

            F F   กF                                    F           F         ˁ        ก            ก ก         F
        F              F                  F F                   ก           F F       ก F

     1. ก                  F F       กF




                                   F          F                                                     www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                           ก         ก         F       ก     ˈ F
                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                                                              F                                                 61

    ก        ก ˁ                                          ก F                 ก              F        ก                     F               ˈ                       F PDF




                                       FF F             F F               F             ก               กF Code php F F                                                       ก
F           F          F           4          ก               ก                         1      Fก       A4 F F             F                                                      F
           40              (                  F                       F                      F    F ThaiPDF/exportPDF.php)

                   F               F F                    ก       F               F F             F Excel                           F                       F          User



            1.                 F                  F F         F               ก             Excel             F ˂      F                        F               ʽ F

                  F F                               F                                                              ก                   F
             04123                       123456                                                           F                supap@tlp.ac.th
             04124                       123456                   ก                                                        rakdee@tlp.ac.th
             04125                       123456                   F                                                        tom@tlp.ac.th

            2.     ก      F F     F F                                                             F F              F      F excel                   F                   ก
                   ก Fก       Fก                                          ก                 F F                        ก F                              F              ก              F
          ก ก F       F ก F        ก                                                F                 F                 F                                       F      F ก                F
           ก F F user.xls
            3. F ก               F F                                      ก             .                      ก           F F ก F F F                                        F F
        ก F F F      F ก F m1                                         ก                          .1


                                       F          F                                                                                                 www.kroonis.org
    namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                                               ก               ก       F           ก                 ˈ F
                                                                                                                                                                                      .::
Fก Cloning FreeBSD 8.0 F                                                        F                      62

        4. ก        F F                     ก                       ก                  ก
      ก ก F
        5. กก F F F                    F ก             F F        F F       ก       F Excel       ก ˁ




        6.             ก    F F ก       F             ก ˁ
        7.         F       ก F user.xls         ก           ก ˁ                            ก F          ก
  F          F F             ก F user.xls       F F                     ก       F




                                   F          F                                                   www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                               ก          ก      F   ก     ˈ F
                                                                                                               .::
Fก Cloning FreeBSD 8.0 F                                                          F                                           63

          8. ก                 ก   F            F F       F       กก F F F            F ก             F Excel             ก F
  ก                        ก                F         ก       F
                 8.1                   F     ก ˁ                                  F         ก                F F         ก F
      F                (       F           ก   F F                 Fก F   admin              กF         F          F           F)




                                   F          F                                                             www.kroonis.org
namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                ก         ก          F     ก          ˈ F
                                                                                                                                    .::
Fก Cloning FreeBSD 8.0 F                                                          F                                                64

                                            Setup Squid Proxy Server

                  F                     ก              ก (squid)                   Fก F           ก F
     F        F                 ˈ              F   F               F               ก Blockweb      F
                          F F        F                                            ˈ F         F
 F ก      F                Fก       F F      Fก                                squid30          F
      ns# cd /usr/ports/www/squid30
      ns# make config
                 F ก ˆ กF         F ก [ x ] SQUID_DELAY_POOLS     F F
ก ก ก ก                   Blockweb     ก               Fก F   F F                                                               ก
     Fก           OK F ก ˁ Enter




         ns# make install clean                               กF           ก               squid30                 F         .........

                          F ก       ก
                               FreeBSD F         F   F squid.conf F F                                                                   ก
 ก        F           F F กF        F squid.conf   F   ก F squid.conf
         ns# cd /usr/local/etc/squid
         ns# cp /home/admin/www/ConfigWWW/squid.conf ./

                      F
                      F FreeBSD       F (Admin)                        ก            squid30 ก ports                                 F
F ก        กF      F squid.conf        F
       ns# nano /usr/local/etc/squid/squid.conf
  F กF          F                        # ก
              http_port 8080 transparent                                       //              F           F
              icp_port 3130                                                    //          F           F


                                    F          F                                                               www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                             ก          ก            F           ก       ˈ F
                                                                                                                                        .::
Fก Cloning FreeBSD 8.0 F                                                 F                                         65

     cache_dir ufs /usr/cache 3500 16 256           #                       F                   ก         กF          F
ก   F cache     F
     access_log /var/log/access.log squid           #               F                           ก         กF      F
ก Log Files       squid    Fก       ก F F /var/log/
     cache_log /varlog/cache.log                    #           F                               ก
     cache_store_log /var/log/store.log             #                   F                       ก

F      acl localhost src             F F กF             F F      F
          acl localnet src 192.168.212.0/24
F              acl CONNECT method CONNECT F                     F F
        #ก F             F F    F squid30 F              Blockweb F                                     F F               ก
F     F F F F                F     http://192.168.212.1/STOP/       F                       F                 ʽ

        acl time_block time M T W H F 08:00-16:30
        acl time_block time A S 06:00-13:00
        acl time_block time A S 20:00-24:00
        acl bsex url_regex "/var/www/html/bsex.txt"
        http_access deny bsex time_block
        deny_info http://192.168.212.1/STOP/ bsex time_block

        #ก F          F   F    F squid30                F                           F                    F F ก 50M
          F Error

        acl time_acl time M T W H F 8:00-16:00
        acl time_acl2 time S A 8:00-17:00
        reply_body_max_size 50 MB time_acl
        reply_body_max_size 50 MB time_acl2




                                       F          F                                                 www.kroonis.org
    namo_nis@hotmail.com Mobile : 0-8335-26868 :.           ก                   ก       F           ก     ˈ F
                                                                                                                          .::
Fก Cloning FreeBSD 8.0 F                                           F                                66

          # Block            F         F     ก F
          acl limitspeed_web url_regex -i youtube.com 4shared.com .rar .wmv .mov
/         # ก                ก                  F ก ก
          delay_pools 2
          delay_class 1 2
          delay_parameters 1 15000/15000 8000/8000
          delay_access 1 allow limitspeed_web time_block
          delay_class 2 2
          delay_parameters 2 512000/512000 64000/64000
          delay_parameters 2 512000/512000 300000/300000
          delay_access 2 allow my_network time_block
  ก ก                    F ˈ               ก              time_block       F 65
        F       F          our_networks F              F                           F          F
Proxy F
                   #http_access allow our_networks
                   http_access allow localwifi                                             F
                   # And finally deny all other access to this proxy
                   http_access deny all
                  Fก ก           ก        ก กก กF               F squid.conf
                  F squid F Cache             F          ก          F        ก F     F
          # /usr/local/sbin/squid -zD //              F squid F cache            F     squid -z ก F
          # /usr/local/sbin/squid & //               F squid

          ก                   F rc.local F
                ns# nano /etc/rc.local         F
        ipfw add pass tcp from any to any 3990 via setup                                //
        ipfw add 1700 fwd 192.168.212.1 tcp from any to 192.168.212.0/24 80            //      F
        ipfw add 1800 fwd 192.168.212.1,8080 tcp from 192.168.212.0/24 to any 80       //              F
        ipfw add 1900 deny ip from any to any 8080                                     //          F

                                     F          F                                  www.kroonis.org
  namo_nis@hotmail.com Mobile : 0-8335-26868 :.                  ก       ก     F   ก     ˈ F
                                                                                                           .::
Fก Cloning FreeBSD 8.0 F                                                             F                                67

                       ก          F /etc/rc.local   F       ก กก           กF        ก                   F        F rc.conf

                ns# echo squid_enable= YES >> /etc/rc.conf

                                    F Cache squid                         กF ˆ       Cache
                        ʽ        F Proxy                    ก              F F cache             F         ก F         F
                F                 F      F กF               F           F clearcache.sh F                F   ก                F
Cache       F
                ns# nano /etc/squid.sh
    F            F

                    #!/bin/sh
                    echo "###############################################"
                    echo "Script Clear Cache squid30 Auto"
                    echo "###############################################"
                    /usr/local/etc/rc.d/squid stop
                    /bin/sleep 10
                    rm -rf /var/cache/*
                    /bin/sleep 10
                    /usr/local/sbin/squid -z
                    /bin/sleep 10
                    /usr/local/etc/rc.d/squid start
                    echo "#############################################"
                    echo "Clear Cache Squid Proxy Finish"

                                Fก F        ก           ก       F         ก กก      กF

                ns# chmod 775 /etc/squid.sh
                ns# nano /etc/crontab

        ก                   F                   F                   F
                                    F          F                                                             www.kroonis.org
 namo_nis@hotmail.com Mobile : 0-8335-26868 :.                                     ก         ก       F   ก       ˈ F
                                                                                                                                  .::
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd
หนังสือ Cloning freebsd

More Related Content

What's hot

J1 connector with 4 pins rework procedure
J1 connector with 4 pins rework procedureJ1 connector with 4 pins rework procedure
J1 connector with 4 pins rework procedureselvavish
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4Warawut
 
1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลงmuang82
 
9789740333036
97897403330369789740333036
9789740333036CUPress
 
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์Warawut
 
กลุ่ม3
กลุ่ม3กลุ่ม3
กลุ่ม3bannoi001
 
ระบบสืบพันธุ์
ระบบสืบพันธุ์ระบบสืบพันธุ์
ระบบสืบพันธุ์krulam007
 
ใบความรู้7
ใบความรู้7ใบความรู้7
ใบความรู้7Aobinta In
 
ระบบหมุนเวียน
ระบบหมุนเวียนระบบหมุนเวียน
ระบบหมุนเวียนThanyamon Chat.
 
01 form-mdi
 01 form-mdi 01 form-mdi
01 form-mdiWarawut
 
การจัดการเรียนการสอน
การจัดการเรียนการสอนการจัดการเรียนการสอน
การจัดการเรียนการสอนAnanpha Dear
 
Microsoft word เกมบิงโกสัตว์
Microsoft word   เกมบิงโกสัตว์Microsoft word   เกมบิงโกสัตว์
Microsoft word เกมบิงโกสัตว์Thanyamon Chat.
 
ตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้นตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้นwanwilai
 
เซลล์ของสิ่งมีชีวิต
เซลล์ของสิ่งมีชีวิตเซลล์ของสิ่งมีชีวิต
เซลล์ของสิ่งมีชีวิตThanyamon Chat.
 

What's hot (20)

Login
LoginLogin
Login
 
J1 connector with 4 pins rework procedure
J1 connector with 4 pins rework procedureJ1 connector with 4 pins rework procedure
J1 connector with 4 pins rework procedure
 
Brief create list-km090354
Brief create list-km090354Brief create list-km090354
Brief create list-km090354
 
Business Computer Project 4
Business Computer Project 4Business Computer Project 4
Business Computer Project 4
 
1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง
 
9789740333036
97897403330369789740333036
9789740333036
 
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์
พื้นฐานภาษาสำหรับพัฒนาเว็บไซต์
 
กลุ่ม3
กลุ่ม3กลุ่ม3
กลุ่ม3
 
ระบบสืบพันธุ์
ระบบสืบพันธุ์ระบบสืบพันธุ์
ระบบสืบพันธุ์
 
Lms training v01-20080909
Lms training v01-20080909Lms training v01-20080909
Lms training v01-20080909
 
ใบความรู้7
ใบความรู้7ใบความรู้7
ใบความรู้7
 
ระบบหมุนเวียน
ระบบหมุนเวียนระบบหมุนเวียน
ระบบหมุนเวียน
 
01 form-mdi
 01 form-mdi 01 form-mdi
01 form-mdi
 
Fedora g11n-presentation-template-v0.2
Fedora g11n-presentation-template-v0.2Fedora g11n-presentation-template-v0.2
Fedora g11n-presentation-template-v0.2
 
การจัดการเรียนการสอน
การจัดการเรียนการสอนการจัดการเรียนการสอน
การจัดการเรียนการสอน
 
Microsoft word เกมบิงโกสัตว์
Microsoft word   เกมบิงโกสัตว์Microsoft word   เกมบิงโกสัตว์
Microsoft word เกมบิงโกสัตว์
 
ตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้นตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้น
 
เซลล์ของสิ่งมีชีวิต
เซลล์ของสิ่งมีชีวิตเซลล์ของสิ่งมีชีวิต
เซลล์ของสิ่งมีชีวิต
 
เจ็ดดาวเหนือ
เจ็ดดาวเหนือเจ็ดดาวเหนือ
เจ็ดดาวเหนือ
 
การกำหนดตัวแปร
การกำหนดตัวแปรการกำหนดตัวแปร
การกำหนดตัวแปร
 

Viewers also liked (14)

Miec wplyw na zmiany
Miec wplyw na zmianyMiec wplyw na zmiany
Miec wplyw na zmiany
 
Moc błogoslawienstwa
Moc błogoslawienstwaMoc błogoslawienstwa
Moc błogoslawienstwa
 
Czego Bog nam nie dal 4
Czego Bog nam nie dal 4Czego Bog nam nie dal 4
Czego Bog nam nie dal 4
 
02 najwazniejsze rzeczy
02 najwazniejsze rzeczy02 najwazniejsze rzeczy
02 najwazniejsze rzeczy
 
Aarhus på mobilen
Aarhus på mobilenAarhus på mobilen
Aarhus på mobilen
 
Scvngr praesentation
Scvngr praesentationScvngr praesentation
Scvngr praesentation
 
Byc dzieckiem bozym
Byc dzieckiem bozymByc dzieckiem bozym
Byc dzieckiem bozym
 
Dokąd idziesz
Dokąd idzieszDokąd idziesz
Dokąd idziesz
 
1001 fortællinger
1001 fortællinger1001 fortællinger
1001 fortællinger
 
I guide
I guide I guide
I guide
 
Energikrisen Teknisk Museum
Energikrisen Teknisk MuseumEnergikrisen Teknisk Museum
Energikrisen Teknisk Museum
 
3 d on 2d tv
3 d on 2d tv3 d on 2d tv
3 d on 2d tv
 
Exposé o miłości
Exposé o miłościExposé o miłości
Exposé o miłości
 
Industrimuseum, Horsens
Industrimuseum, HorsensIndustrimuseum, Horsens
Industrimuseum, Horsens
 

Similar to หนังสือ Cloning freebsd

การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นKanda Runapongsa Saikaew
 
Field Binding
Field BindingField Binding
Field BindingWarawut
 
Java Web Service
Java Web ServiceJava Web Service
Java Web Servicevongthow
 
ExamMasterDetail
ExamMasterDetailExamMasterDetail
ExamMasterDetailWarawut
 
9789740333036
97897403330369789740333036
9789740333036CUPress
 
Install PrestaShop 1.2.4.0 Thai
Install PrestaShop 1.2.4.0 ThaiInstall PrestaShop 1.2.4.0 Thai
Install PrestaShop 1.2.4.0 ThaiWarawut
 
เส้นทางอาชีพสายไอที (IT carrer paths)
เส้นทางอาชีพสายไอที (IT carrer paths)เส้นทางอาชีพสายไอที (IT carrer paths)
เส้นทางอาชีพสายไอที (IT carrer paths)Asst.Prof.Dr.Arnut Ruttanatirakul
 
Ch01 introduction-web
Ch01 introduction-webCh01 introduction-web
Ch01 introduction-webWarawut
 
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4ธนวัฒน์ แสนสุข
 

Similar to หนังสือ Cloning freebsd (12)

การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้น
 
Field Binding
Field BindingField Binding
Field Binding
 
Java Web Service
Java Web ServiceJava Web Service
Java Web Service
 
Authen Free Bsd6 2
Authen Free Bsd6 2Authen Free Bsd6 2
Authen Free Bsd6 2
 
ExamMasterDetail
ExamMasterDetailExamMasterDetail
ExamMasterDetail
 
9789740333036
97897403330369789740333036
9789740333036
 
Install PrestaShop 1.2.4.0 Thai
Install PrestaShop 1.2.4.0 ThaiInstall PrestaShop 1.2.4.0 Thai
Install PrestaShop 1.2.4.0 Thai
 
เส้นทางอาชีพสายไอที (IT carrer paths)
เส้นทางอาชีพสายไอที (IT carrer paths)เส้นทางอาชีพสายไอที (IT carrer paths)
เส้นทางอาชีพสายไอที (IT carrer paths)
 
Ch01 introduction-web
Ch01 introduction-webCh01 introduction-web
Ch01 introduction-web
 
โครงสร้างภาษาซี1
โครงสร้างภาษาซี1โครงสร้างภาษาซี1
โครงสร้างภาษาซี1
 
Kb015
Kb015Kb015
Kb015
 
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4
การติดตั้ง และใช้งาน โปรแกรม Hd guard ver4
 

หนังสือ Cloning freebsd

  • 1.
  • 2. Fก Cloning FreeBSD 8.0 F F 1 ก กF FreeBSD 8.0 & Authen F F F Fก Cloning FreeBSD8.0 & Setup Authentications ( CPU 32bit) F ก FreeBSDAuthen F F FreeBSD & Authen F F Fก ˈ F F ก ˁ + F F Fก Fก ก กF ก F F FFก F F กF FFก F F ˆ F ˈ ก F F F ก ʾˉ F (yim) F ก ก ก F F Config F F ก Service FreeBSD Server F F reboot , shutdown , reload squid F PHP + Sudo Fก F F F F Fก ก ก FreeBSD F FreeBSD & Authen123 F F F Fก ( F F MSN F) F ก FreeBSD & Authen ก F Fก Fก F FF ˆ F ก Fก F F F F ก OPEN SOURCE F F ICT F F ก Word F ก F ก F F www.kroonis.org/SetupAuthen8.doc 10 ก ก 2553 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 3. Fก Cloning FreeBSD 8.0 F F 2 F ก กF FreeBSD 8.0 1. F F F ก Fก / F ก F ก ˁ Enter 2. ก F Fก ˁ Enter 3. ก Package F ก Fก ˁ Spacebar 4. ก ก FF nano Fก ˁ Ctrl + o ( ) F ˁ Enter 5. ก กก กF F nano Fก ˁ Ctrl + x 6. F F o 0 F Setup FreeBSD8.0 ก ก FreeBSD8.0 ˆ PC , Server F F Fก F Onboard F F F ˆ FreeBSD F F กก ก F Onboard ก F ก F กF ก F F F Fก FreeBSD8.0 ก F F F ʽ F ( F F ก F FF ʽ F F ก F) 1. Setup FreeBSD 8.0 F F F FreeBSD 8.0 F F ˈ F F 2 F FreeBSD8.0 #1 F Config 8.0 F F Fก FreeBSD 8.0 1.1 F CMOS F Boot ก CD-ROM กF ( F F ก F ) 1.2 ก F F F F F F CD / DVD ROM 1.3 ก FreeBSD 8.0 ก Boot F กF Country Selection F ก ˈ 218 Thailand F ก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 4. Fก Cloning FreeBSD 8.0 F F 3 ก USA ISO F ก ˁ Enter กก Standard ก ˁ Enter ก ˁ Enter ก F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 5. Fก Cloning FreeBSD 8.0 F F 4 ก ˁ Enter ก ก F ˂ ก Fก ˁ D ก F ก F F F ก ˂ F C F ก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 6. Fก Cloning FreeBSD 8.0 F F 5 ก ˁ Enter ก ก F ˂ F Fก q F F Install Boot Manager for drive F กก Standard ก ˁ Enter F Message F F Fก Create BSD partition Fก ˁ Enter F F ก F FreeBSD Fก ˁ Enter 1 F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 7. Fก Cloning FreeBSD 8.0 F F 6 / 512M Swap 2 F F 1G 2 F 2048M /home 5G /tmp 500M /usr 10G /var F 1. F F root Fก ˁ C ˂ F Fก ˈ 512M 1G ก F F Fก ˁ Enter 1.1 ก FS A file system F ก ˁ Enter 1.2 F / ก ก ˁ Enter 2. F F Swap Partition Fก ˁ C ˂ F Fก ˈ 2 F F Fก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 8. Fก Cloning FreeBSD 8.0 F F 7 2.1 ก ˁ ก ก Swap A swap partition. 3. F F home Fก ˁ C ˂ F Fก ˈ 5G 3.1 F ก ˁ Enter 3.2 ก FS A file system F ก ˁ Enter 3.3 F F /home F ก ˁ Enter 4. F F tmp ˈ ก F ก F F F F F ก F F F 500M 4.1 Fก ˁ C ˂ F Fก ˈ 500M 5. F F usr ก F F F F F 10G 4.1 Fก ˁ C ˂ F Fก ˈ 10G 4.2 ก FS A file system F ก ˁ Enter 4.3 F F /usr F ก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 9. Fก Cloning FreeBSD 8.0 F F 8 6. F F var ˈ F ก Log Files , Database F F 6.1 Fก ˁ C ˂ F F ก ˁ Enter 6.2 ก FS A file system F ก ˁ Enter 6.3 F F /var F ก ˁ Enter ก Fก q ก กก F (Fdisk) F ก F F 6 F ก Choose Distributions F ก 4 , 5 , 6 , B Costom ( F ก src sys) ก [ x ] 4 Developer ก ก ˁ Spacebar ก F ก F ก ก ˈ [ x ] en F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 10. Fก Cloning FreeBSD 8.0 F F 9 ก Fก OK F ก ˁ Enter ก F ก F ก ก F 5 Kern-Developer , 6 User ก F F F F ก F ก Fก ˁ ก B Custom F ก ˁ ก src ก [ x ] sys /usr/src/sys (FreeBSD kernel) Fก ˁ OK F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 11. Fก Cloning FreeBSD 8.0 F F 10 ก F src ก OK ก ˁ Enter ก F ก ก Fก OK F ก ˁ Enter ก F ก ก Fก OK ก ˁ Enter F F ก ก F F ก 1. CD / DVD Install from a FreeBSD CD/DVD ก ˁ Enter ก ˁ Enter ก กF ก F Partition F ก ก F F F F ก ก F F F /usr/sbin/sysinstall F sysinstall ก F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 12. Fก Cloning FreeBSD 8.0 F F 11 ก F Server F ก Yes F ก LAN F F ก F LAN ˈ F F ก ISP ก FreeBSD ก F F F dc0 , dc1 bge0 , bge1 Fก F ก F ( ก ก F em0 F ก ก ) - F ก LAN ก em0 ก ˁ Enter F F ก No F F IPv6 F ก No FF ก ก ก FF F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 13. Fก Cloning FreeBSD 8.0 F F 12 ˈ ก F IP Address Fก ก F ก - Host : F F F ก F authen.log.com Fก Domain : ก FF F -ก IPv4 Gateway : F F Gateway F F F F -ก Name server : F F DNS F F F F -ก IPv4 Address : FF ก F ก F 203.172.188.130 -ก Netmask : F F Netmask F F F ipstar ก ก ก F F Netmsk 255.255.255.248 ( F F 6/4 F) F F F F F F F ก F F ก F F F F F ก IPv4 Gateway Name Server IPv4 Address Netmask ADSL 192.168.1.1 192.168.1.1 192.168.1.1 255.255.255.0 Leadline 203.146.15.9 255.255.255.248 ipstar samart 203.192.33.34 255.255.255.248 ipstar TOT 192.168.5.100 203.113.24.199 192.168.5.1 255.255.255.0 -ก OK F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 14. Fก Cloning FreeBSD 8.0 F F 13 Fก F 1 F ก Yes F ก F Server ˈ Gateway F ก Yes FF ก F Network service that it Provides F ก No F ก Remote F Server SSH F ก Yes FF ก F FTP anonymus F ก No FF ก F NFS Server F ก No F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 15. Fก Cloning FreeBSD 8.0 F F 14 FF ก F NFS client F ก No F ก No F ก F time zone F ก Yes F ก No ก F ก Asia F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 16. Fก Cloning FreeBSD 8.0 F F 15 ก 44 Thailand F ก ˁ Enter ICT look reasonable F ก Yes F F ก F F Linux F F ก Yes F F ก Package ก F ก No F F F ก F Account user F F ก Yes F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 17. Fก Cloning FreeBSD 8.0 F F 16 User and group Management F F ก F F F F F F ˂ ก Group F ก ˁ Enter F F ก F F F admin - ก F F (admin) ˂ ก User Add user Fก F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 18. Fก Cloning FreeBSD 8.0 F F 17 Add User F admin - F Login id: F F admin - F Group: F F admin - F Password: F F admin F ก ก ˈ logserver - F Full name: F User - F Member groups: F F ก F user remote server F F F F wheel ก ก F F F Fก OK ก ก Adduser F F ˂ ก X Exit this menu ก กก Adduser F ˂ F root ก ก F root F F Hack ก F F ˂ EN F F F F =k9b9hv dki8ofu ก F F F F ( ..... ..... F ก ) F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 19. Fก Cloning FreeBSD 8.0 F F 18 New password : ˂ F root F F Retype new password : F root ก F F ก Package กF F F ก F ก No ก ก F sysinstall Main Menu F ก [ X Exit Install ] ก Yes F F F CD ก ก reboot กF Boot F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 20. Fก Cloning FreeBSD 8.0 F F 19 F ก login : F root ˂ F root Fก F FreeBSD 8.0 F F F root =k9b9hv dki8ofu F ก F F F root ก F ก F F ก F F F 2 ˈ F Config 8.0 F F F CD-ROM F ns# mount /cdrom F ก CD-ROM ns# cd /cdrom/distfiles F F CD-ROM F distfiles ns# cp -rf * /usr/ports/distfiles ก F F F distfiles ns# cd /cdrom/www/ F F www ก F CD-ROM ns# mkdir /home/admin/www F ก www F /home/admin/ ns# cp -rf * /home/admin/www ก F F /home/admin/www/ F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 21. Fก Cloning FreeBSD 8.0 F F 20 ก กก F F CD-ROM F F Config 8.0 ก ns# mount /cdrom ns# cd /cdrom ns# cd / ก กก F CD - ROM ns# umount /cdrom ก กก F CD-ROM F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 22. Fก Cloning FreeBSD 8.0 F F 21 Server F กF ˆ ก ก ก Ports FF ก F Error-Code1 F Admin F F Time Zone ˈ ˆ F F F date ʾ . . F 15/05/2553 12:30 F F ns# rehash ns# date 201005151230 F F date F FreeBSD Server ˈ F ˆ ns# date Update Ports Tree ก กF F F Error-code1 F F F F ก update ports tree F F F ก(F ก F ThaiBSD) # portsnap fetch extract update ก update F F # portsnap fetch update F ports tree ก ˈ ˆ F ˆ url F F F F กF ก F Fก F + Server ก nano กF F Config F ns# cd /usr/ports/editors/nano/ ns# make install clean F F Fก OK F ก ˁ Enter F กF ก ก nano ก F FreeBSD F ˆ F ก nano F F F reboot F F rehash ก F nano F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 23. Fก Cloning FreeBSD 8.0 F F 22 ก F nano F F - F F ก ก ˁ Ctrl + w F F F F ก F - F ก F nano +120 /usr/local/etc/squis/squid.conf /usr/local/etc/squid/sqdiu.conf F F ก กF +120 F F ʽ F F 120 F F F F F 1. config Nameserver ns# nano /etc/resolv.conf F F DNS F - F F F ipstar DNS F 203.192.33.34 203.146.237.237 203.146.15.9 - F F F ก ก ก DNS F 203.146.15.10 203.146.237.237 - F F F ipstar TOT DNS F 203.113.24.199 203.113.127.199 - F F F ADSL DNS F 192.168.1.1 DNS ก F F F ก ก กก กF F resolv.conf 2. Config System ns# nano /etc/rc.conf F F Fก ก F 2 F F remote F ก ** F FF F F ก F ** F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 24. Fก Cloning FreeBSD 8.0 F F 23 F ifconfig_ ก F 2= inet 192.168.212.1 netmask 255.255.255.0 กF ก F F F ก F rc.conf ก ˁ Ctrl + o F Enter ก กก กF Fก ˁ Ctrl + x 3. Reboot Server Fก กF F F ˈ ก ก กF F Fก ก F 2 F F reboot server ns# shutdown -r now ก F Server Boot F F Login : F ก Login F F F root Fก F F F F 4. ก Boot F Login F root F F F ipadress ก F F ns# ifconfig F F ก F F ก F 2 - ก em0 ก ก 192.168.5.240 ( ก) - 2 em1 ก 192.168.212.1 ( ) F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 25. Fก Cloning FreeBSD 8.0 F F 24 F ก F F F Server F F F ก F (Clients) Remote F config ก F Admin F F F Server F ก SSH ก sshsecureshellclient-3.2.9 F F CD-ROM F 2 F F ก F ˈ F Config 8.0 F F ก sshsecureshellclient-3.2.9.exe F F FF :-) 1. ก ก sshsecureshellclient-3.2.9.exe 2. ก ˁ 3. ก ˁ 4. ก ˁ 5. ก ˁ 6. ก ˁ 7. ก ˁ 8. กF ก F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 26. Fก Cloning FreeBSD 8.0 F F 25 9. ก ˁ ก F F Desktop 2 F Remote Server F ก FTP ก SSHSecureShellClient F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 27. Fก Cloning FreeBSD 8.0 F F 26 Remote F ก FreeBSD Server F Cross - F F F ก - ( F F F F F Swicthing Hub) ก F LAN 2 F ก LAN Clients Notebook 1. ก ก SSHSecureShellClient-3.2.9.exe ʽ F F F ก ˁ Quick Connect 2. ˂ Host Name : F F 192.168.212.1 F ก ˁ admin User ก FreeBSD 8.0 3. F F ก Server F F F F User ก F FreeBSD 8.0 F ก F admin F F logserver 4. F F F ก F F F Server FreeBSD F su F ns$: su passwd : F F root F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 28. Fก Cloning FreeBSD 8.0 F F 27 F F root ก F ก F F # F ˈ root F 5. ก ˁ New File Transfer Window 6. ก SSH Secure File Transfer ʽ F F ก F ก F ก ก ftp F F ˈ ก F F ˈ Server ก F F ก ก F F F F F F ก ก F F ก ก Remote Server F ก SSH F http://www.npd.in.th/~manis ก F ก vi Admin ก กF FF UNIX F vi Fก F F กF ก F Fก ก Fก ˁ Fก ˁ dd r F i F R F กF ก ESC :wq! ก ก : set nu x ก a F F ก Cursor yy ก :q ก ก ก p Cursor / string F F F ก F ก CloningFreeBSD8.0 & Authen F F nano Admin F F ก F F ก ก F ก Notepad ก F F F กFก F vi F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 29. Fก Cloning FreeBSD 8.0 F F 28 ก Compile Kernel Compile Kernel F ก ก F Authen , QUOTA , ADSL ˈ F F F F ns# cd /usr/src/sys/i386/conf F F /usr/src/sys/i386/conf ns# cp /home/admin/www/WIFI8 ./ ก F /home/admin/WIFI8 ˈ ก F WIFI8 F F WIFI8 F options F F F F F F F FF F F F F 29 F F F Admin ก F F F ก F options F # cd /usr/src/sys/i386/conf F F /usr/src/sys/i386/conf # cp GENERIC WIFI8 ก F GENERIC ˈ F F WIFI8 # nano WIFI8 F F options F * F F F * ident WIFI8 options IPFIREWALL options IPFIREWALL_FORWARD options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=120 options IPDIVERT options ALTQ options ALTQ_CBQ options ALTQ_RED options ALTQ_RIO F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 30. Fก Cloning FreeBSD 8.0 F F 29 options ALTQ_HFSC options ALTQ_PRIQ options ALTQ_NOPCC device pf device pflog device pfsync #ADSL Manis options NETGRAPH options NETGRAPH_ASYNC options NETGRAPH_BPF options NETGRAPH_ECHO options NETGRAPH_CISCO options NETGRAPH_FRAME_RELAY options NETGRAPH_HOLE options NETGRAPH_IFACE options NETGRAPH_LMI options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_PPP options NETGRAPH_PPTPGRE options NETGRAPH_RFC1490 options NETGRAPH_KSOCKET options NETGRAPH_TEE options NETGRAPH_TTY options NETGRAPH_UI options NETGRAPH_VJC options NETGRAPH_ETHER options NETGRAPH_SOCKET F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 31. Fก Cloning FreeBSD 8.0 F F 30 options NETGRAPH_PPPOE options HZ=1000 ก F ก ˁ Ctrl + o F ˁ Enter ก กก กF ก ˁ Ctrl + x # config WIFI8 # cd ../compile/WIFI8 # make cleandepend;make depend;make;make install ก Compile kernel F NAT Authen FIREWALL F ( 30 - 40 ) F กF compile kernel F F F # nano /etc/rc.conf F *** F F F *** firewall_enable="YES" firewall_type="OPEN" firewall_quiet="YES" natd_enable="YES" natd_interface="em0" // em0 ก F ก F ก F ก natd_flags="-s -u -m" pf_enable="YES" pf_rules="/etc/pf.conf" pf_flags="" pflog_enable="YES" pflog_logfile="/var/log/pflog" pflog_flags="" กF F /etc/rc.conf ก F F F ก ก กก กF F boot F F reboot ก Enter boot F F F F kernel F F uname -a F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 32. Fก Cloning FreeBSD 8.0 F F 31 ns# uname -a FreeBSD ns.authen123.com 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Tue Apr 6 11:13:15 ICT 2010 admin@ns.authen123.com:/usr/src/sys/i386/compile/WIFI8 i386 ns# ก FAMP 8.0 (Mysql50 + Apache22 + PHP5) ก F UNIX F F F ก F F 2-3 ก ก ˁ TAB FreeBSD F F ก ก F Server F FreeBSD ก FAMP ก FreeBSD F 1. Setup Perl5.8 ns# cd /usr/ports/lang/perl5.8 ns# make config ก Options ก OK F ก ˁ Enter ns# make install && make clean // กF Perl5.8 ก F F ..... Clearning .... perl5.8 F F F F 2 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 33. Fก Cloning FreeBSD 8.0 F F 32 2. Setup Mysql50 ns# cd /usr/ports/databases/mysql50-server ns# make WITH_CHARSET=tis620 WITH_XCHARSET=all WITH_COLLATION=tis620_thai_ci WITH_OPENSSL=yes BUILD_OPTIMIZED=yes WITH_ARCHIVE=yes WITH_FEDERATED=yes WITH_NDB=yes install clean make WITH_CHARSET=tis620 F ก ก F Authen8.doc F F F F F F F Config 8.0 F F F SSH F ก F ก F FF F F ก ก ก F Authen8.doc FF ก ก Microsoft Word F ʽ F Authen8.doc F ก F ʽ ก SSH Secure Shell Client F F 1. ก ˁ F ˂ F ก F ก Server 2. F FF ก F ก F ก SSH Secure Shell Client F ˂ F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 34. Fก Cloning FreeBSD 8.0 F F 33 3. F F F admin ก F F F ก Server F ก ˁ OK F กF $ F F F F F F F F admin F su ˈ root F 4. F su F ก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 35. Fก Cloning FreeBSD 8.0 F F 34 5. F F root F ก F FreeBSD 8.0 ก F F F admin ˈ root F F root ก ก root ก $ ˈ # F 6. F ก F Authen8.doc ก F ก F ก ก SSH Secure Shell Client ( Fก ˁ Alt + Tab ˈ F ก F ก ʽ F Windows) 6.1 ก ˁ 6.2 กF ก F ก F ก F ก SSH Secure Shell Client F ก ก F F F F F F ก FF ก ก F Authen8.doc F F ก SSH Secure Shell Client ก ก F ก ˁ F Admin F F F F ก F ก F F F F ก SSH Secure Shell Client F F F F ก F F F ก กก F F ก F ก ก F F F F กF Mysql50 F F FAMP 8.0 F F CD-ROM ก Mysql50 F FF ก ก ports ก F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 36. Fก Cloning FreeBSD 8.0 F F 35 ก F ก F 15 -25 ก F This port has installed the following startup scripts which may cause /usr/local/etc/rc.d/mysql-server // start / stop mysql-server ===> Cleaning for mysql-server-5.0.45_1 ns# F mysql_enable="YES" F F /etc/rc.conf ns# echo mysql_enable= YES >> /etc/rc.conf ns# reboot restart server F mysql50 F ก F F Server F F F F # /usr/local/bin/mysqladmin -u root password F F mysql root F # /usr/local/bin/mysqladmin -u root password dkil7dkk=k9b ก F F mysql F กก F F SSH ns# mysql -u root -p'dkil7dkk=k9b' // dkil7dkk=k9b rootmysql Welcome to the MySQL monitor. Commands end with ; or g. mysql> F F F radius , syslog ก F root F F radius , syslog F F F dkil7dkk=k9b ( F ก F F F ก ก กF F Config F F ก ก F Fก F F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 37. Fก Cloning FreeBSD 8.0 F F 36 mysql> create database radius; // F F F radius Query OK, 1 row affected (0.00 sec) mysql> create database syslog; // F F F syslog Query OK, 1 row affected (0.00 sec) mysql> grant all on radius.* to root@localhost identified by 'dkil7dkk=k9b'; // ก Fก F F F radius ก F root F F radius ก F F F radius dkil7dkk=k9b mysql> grant all on syslog.* to root@localhost identified by 'dkil7dkk=k9b'; // ก Fก F F F syslog ก F root F F syslog ก F F F rdius dkil7dkk=k9b mysql> exit // F exit ก ก F ก Mysql 3. ก Apache22 F ก www ns# cd /usr/ports/www/apache22 ns# make config Fก ก Fก ˁ Spacebar F 1 ก F ก [ * ] MYSQL F ก OK ก ˁ Enter ns# make install && make clean กF ก F F F F F F Fก ˁ Spacebar ก F F ก ˁ Tab OK ก ก ˁ Enter ( F ก 10 20 ) ก F F config ก Apache22 F F /usr/local/etc/apache22 F F F กF Fก F F F F /var/www/html/ F ก path ก ก ก F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 38. Fก Cloning FreeBSD 8.0 F F 37 F กF F httpd.conf F F ก F shellscipt F Config Fก apache22 ns# nano /root/apache22.sh F F #!/bin/sh kldload accf_http mkdir /var/www mkdir /var/www/html sed -i '' 's,DocumentRoot "/usr/local/www/apache22/data",DocumentRoot "/var/www/html",g' /usr/local/etc/apache22/httpd.conf echo accf_http_load="YES" >> /boot/loader.conf /usr/local/sbin/apachectl start echo apache22_enable="YES" >> /etc/rc.conf F sed -i s, F , F F ,F g F F sed -i F FFก ˈ ก F ก กก กF ก F F apache22.sh ns# chmod 775 /root/apache22.sh ns# sh /root/apache22.sh ʽ ก Internet Explorer F F 192.168.212.1 ก ก Apache22 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 39. Fก Cloning FreeBSD 8.0 F F 38 F Apache22 F User F F F # cd /usr/local/etc/apache22/Includes # nano user_dir.conf ก F F F F SSH <IfModule mod_userdir.c> UserDir public_html <Directory /var/www/html/*> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory> </IfModule> 4. PHP5 ก FreeBSD8.0 ns# cd /usr/ports/lang/php5 ns# make config ก F ก [ * ] APACHE F F F ก PHP error F save ... Files F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 40. Fก Cloning FreeBSD 8.0 F F 39 ns# make install clean กF PHP5 F F F ก FF ก Fก OK ก PHP5 F F php5-extensions F F # cd /usr/ports/lang/php5-extensions # make config F ก ˆ กF F BZ2 , CALENDAR , CTYPE , CURL , DOM , EXIF , FILETNFO , FILTER , FRIBIDT , FTP , DG , GETTEXT , IMAP , MBSTRING , MYSQL , ODBC , OPENSSL , PCRE , PDF , PDO , PDO_SQLITE , POSIX , SESSION , SIMPLEXML , SOCKETS , SPL , SQLITE , TOKENIZER , XML , XMLREADER , XMLWRTTER , ZIP , ZLIB ก F ก OK ก ˁ Enter F # make install && make clean F F F ก FF ก F ก ก F Fก OK กF php5-extention F F 20 -30 F Fก F F ก ก F Cleaning ...... php5-extensions F F php.ini F php5 F F ก F php.ini ก /home/admin/ConfigWWW/php5/php.ini ns# cp /home/admin/www/ConfigWWW/php5/php.ini /usr/local/etc/ F กF F php.ini F F F F F F กF 5. F Apache22 F F กก PHP5 # nano /usr/local/etc/apache22/httpd.conf F F index.html F F F index.php กF index.html F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 41. Fก Cloning FreeBSD 8.0 F F 40 DirectoryIndex index.php index.html // F index.php กF index.html F AddType application/x-compress .Z F F F AddType application/x-compress .Z ก 3 F F SSH AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .html ก F httpd.conf ก F F F test.php F www ns# echo '<? phpinfo(); ?>' > /var/www/html/test.php ns# /usr/local/sbin/apachectl stop ns# /usr/local/sbin/apachectl start ก F test.php ก ก F F PHP5 F F 192.168.212.1/test.php F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 42. Fก Cloning FreeBSD 8.0 F F 41 ก F echo ก echo F 40 echo '<? phpinfo(); ?>' > /var/www/html/test.php F echo F F /var/www/html/test.php ก F test.php <? phpinfo(); ?> - > F echo F F F F ก F F F F F F - >> F echo ก F F Setup Authentications & Wifi Hostpot 1. Setup Freeradius2 + Setup Coovachilli ns# cd /usr/ports/net/freeradius2 ns# make rmconfig-recursive // F ก F F F F กF ก ns# make config ก Options USER , MYSQL , PERL , PYTHON , DHCP EXPERIMENTAL ก Fก OK F ก ˁ Enter F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 43. Fก Cloning FreeBSD 8.0 F F 42 ns# make install && make clean กF Freeradius2 ก F http://www.freeradius.org/ ===> Cleaning for freeradius-2.1.8_1 2. Setup Coovachilli ns# cd /usr/ports/net-mgmt/coovachilli/ ns# make install && make clean กF Coovachilli ก F http://www.coova.org/ ===> Cleaning for coovachilli-1.0.12_1 ก Freeradius2 , Coovachilli F F F Config Files F radiusd , Coova F ก ก F F F (Web Mangement) ns# cd /home/admin/www ns# cp -rf * /var/www/html/ กF ก ก F F rootmysql ก F F dkil7dkk=k9b F F ก F rootmysql ˈ F Admin F ก F F ns# mysql -u root -p dkil7dkk=k9b Mysql> grant all on radius.* to root@localhost identified by F F; Mysql> grant all on syslog.* to root@localhost identified by F F; Mysql > exit ก ก ก Mysql F F F F ก Mysql Fก F rootmysql F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 44. Fก Cloning FreeBSD 8.0 F F 43 ns# mysql -u root -p rootmysql F ก F F ก Mysql F F F radius F ก phpMyAdmin F F F ก Internet Explorer ก F 192.168.212.1/db ก F ʽ ก phpMyAdmin2.10.3 F F F F F root F F ก F dkil7dkk=k9b F ก ˁ Enter ( F ก ก ) ก F radius ก F F ก F ก ก Import F F F Freeradius2 F ก ก F Config 8.0 F radius.sql F ก ˁ F ก F F 18 F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 45. Fก Cloning FreeBSD 8.0 F F 44 F F Config Freeradius2 FF F Shellscript F radius.sh F F F ns# nano /root/radius.sh ## F ก F F F F SSH #!/bin/sh echo "######################################" echo "Script Config Freeradius2 By Manis Slangsingha" echo "#######################################" cp /home/admin/www/radius2/clients.conf /usr/local/etc/raddb/ cp /home/admin/www/radius2/sql.conf /usr/local/etc/raddb/ cp /home/admin/www/radius2/radiusd.conf /usr/local/etc/raddb/ cp /home/admin/www/radius2/default /usr/local/etc/raddb/sites-available/ cp /home/admin/www/radius2/dialup.conf /usr/local/etc/raddb/sql/mysql/ echo 'radiusd_enable="YES"' >> /etc/rc.conf /usr/local/etc/rc.d/radiusd start echo "######################################" echo "Create Config Files Freeradius2 Finish" echo "#######################################" ns# chmod 775 /root/radius.sh ns# sh /root/radius.sh F Freeradius2 ก F F Admin F FF ก ก F F F F กF F Config radiusd F F F ( F radius.sh F ก F F ) ns# sed -i -e s,testing123,wifi,g /usr/local/etc/raddb/clients.conf F sed F F testing123 F F secret F ก ˈ F wifi F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 46. Fก Cloning FreeBSD 8.0 F F 45 ns# nano +683 /usr/local/etc/raddb/radiusd.conf # F ก #$INCLUDE sql.conf กF กF $INCLUDE sql/mysql/counter.conf กF ns# nano +38 /usr/local/etc/raddb/sql.conf login= root password= rootmysql F F ns# nano + 148 /usr/local/etc/raddb/sites-available/default กF F # F unix files # ก F sql F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 47. Fก Cloning FreeBSD 8.0 F F 46 # ก F daily F F F ก expiration logintime F F F ก F F expire_on_login noresetcounter dailycounter monthlycounter # F unix # F files F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 48. Fก Cloning FreeBSD 8.0 F F 47 # F unix # F radutmp # ก F sql # F radutmp # ก F sql ก ก F F case sensitive F F F F user ก F F F ก F กF ( F ก F ) ns# nano +81 /usr/local/etc/raddb/sql/mysql/dialup.conf กF กF F # F 82 89 F ก กF กF F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 49. Fก Cloning FreeBSD 8.0 F F 48 F The default queries are case insensitive F # FF F 93 - 100 กF กF กF F group_membership_query = "SELECT groupname F # F F 103 - 106 ก กF กF กF กF F simul_count_query = "SELECT COUNT(*) F # F ก กF กF F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 50. Fก Cloning FreeBSD 8.0 F F 49 กF F /etc/rc.conf ns# echo radiusd_enable="YES" >> /etc/rc.conf ก F Freeradius2 F ns# /usr/local/etc/rc.d/radiusd start F radiusd Fก F Mysql F # radiusd -X ก ก F F ก F F SSH ns# radtest a1 12345 localhost 0 wifi F ก F F radiusd Fก F F ก F radius F F F ก F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 51. Fก Cloning FreeBSD 8.0 F F 50 F F Config CoovaChilli F F Shellscript ก F Config Coovachilli กF F F F ( F F F ConfigAuthen8.0 Server F ) ก LAN ˈ 192.168.212.0/24 ns# nano /root/coova.sh #!/bin/sh echo "######################################" echo "Script Config Coovachilli By Manis Slangsingha" echo 'kern.ipc.msgseg=16000' >> /boot/loader.conf echo 'kern.ipc.msgmnb=16000' >> /boot/loader.conf touch /usr/local/etc/chilli/hs.conf touch /usr/local/etc/chilli/local.conf cp /home/admin/www/coova/defaults /usr/local/etc/chilli/ cp / home/admin/www/coova/main.conf /usr/local/etc/chilli/ echo 'coovachilli_enable="YES"' >> /etc/rc.conf echo 'coovachilli_flags="--coaport 3779 --conf /usr/local/etc/chilli.conf"' >> /etc/rc.conf echo "######################################" echo "Create Config Files Coovachilli Finish" echo "#######################################" # chmod 775 /root/coova.sh # sh /root/coova.sh กF F /usr/local/etc/chilli/defaults F F F F F F LAN F Server ก F ก F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 52. Fก Cloning FreeBSD 8.0 F F 51 ns# ifconfig -a F LAN ก F ก - em0 ก F ˈ ก F ก (WAN) - em1 ก F ˈ ก F (LAN) F sed F F กF ก F ก F Server dc1 ns# sed -i -e s,em1,dc1,g /usr/local/etc/chilli/defaults ns# sed -i -e s,em1,dc1,g /usr/local/etc/chilli/main.conf F ก Coovachilli F ns# /usr/local/etc/rc.d/coovachilli start กF ก . 2 F ก ก Freeradiusd2 F F กF ก . F F rootmysql dkil7dkk=k9b F F rootmysql ก F กF F F F กF Fก F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 53. Fก Cloning FreeBSD 8.0 F F 52 # chmod 777 /var/www/html/admin/upload # chmod 777 /var/www/html/bsex.txt # /usr/local/www/lightsquid/lightparser.pl กF Fก mrtg Fก Server ˆ ns# cfgmaker public@localhost> /usr/local/etc/mrtg/mrtg.cfg ก กF config F mrtg.cfg ns# nano /usr/local/etc/mrtg/mrtg.cfg F F WorkDir: /var/www/html/show/ Options[_]:growright,bits indexmaker --columns=1 --output=/var/www/html/show/index.html /usr/local/etc/mrtg/mrtg.cfg F F F ˈ F ก ˁ Enter F mrtg.cfg 3 Fก Error F ก F F ns# mrtg /usr/local/etc/mrtg/mrtg.cfg F Fก mrtg F F Crontab ns# nano /etc/crontab F F F */5 * * * * root /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg Fก mrtg ก F (update) ก 5 (http://www.thaibsd.com/webboard/show.php?Category=thaibsd&No=11781) F ก F F Authen F F reboot server F # reboot F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 54. Fก Cloning FreeBSD 8.0 F F 53 Admin ก F F ก กF F Config F กF F F ns# echo 'kern.ipc.msgseg=16000' >> /boot/loader.conf ns# echo 'kern.ipc.msgmnb=16000' >> /boot/loader.conf F ก F F Config Coova ns# cp /usr/local/share/examples/coovachilli/main.conf.sample /usr/local/etc/chilli/main.conf ns# touch /usr/local/etc/chilli/hs.conf ns# touch /usr/local/etc/chilli/local.conf ns# nano +14 /usr/local/etc/chilli/defaults กF F ก F LAN HS_LANIF=dc1 # Subscriber Interface for client devices # กF HS_LANIF=eth1 ˈ HS_LANIF= ก F 2 (LAN) HS_NETWORK=192.168.212.0 # HotSpot Network (must include HS_UAMLISTEN) HS_NETMASK=255.255.255.0 # HotSpot Network Netmask HS_UAMLISTEN=192.168.212.1 # HotSpot IP Address (on subscriber network) # F ก ก 10.1.0.0 10.1.0.1 ˈ F HS_UAMPORT=3990 # HotSpot Port (on subscriber network) # กF F F HS_UAMSECRET= ht2eb8ej6s4et3rg1ulp HS_RADIUS=127.0.0.1 HS_RADIUS2=127.0.0.1 HS_RADSECRET=wifi HS_UAMALLOW=192.168.212.0/24 HS_UAMSERVER=192.168.212.1 HS_UAMFORMAT=http://$HS_UAMSERVER/hotspotlogin.php HS_UAMHOMEPAGE=http://$HS_UAMLISTEN:$HS_UAMPORT/prelogin HS_UAMSERVICE=http://$HS_UAMSERVER/hotspotlogin.php F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 55. Fก Cloning FreeBSD 8.0 F F 54 HS_WWWDIR=/var/www/html HS_WWWBIN=/usr/local/etc/chilli/wwwsh กF F /usr/local/etc/chilli/main.conf ก F F # nano /usr/local/etc/chilli/main.conf cmdsocket /var/run/chilli.sock pidfile /var/run/chilli.pid net 192.168.212.0/255.255.255.0 uamlisten 192.168.212.1 uamport 3990 dhcpif dc // กF dc1 ˈ ก F ( LAN) adminuser chillispot adminpasswd chillispot uamallowed 192.168.212.0/24 uamdomain .pm.int uamdomain .authen123.com uamdomain .avast.com uamdomain .free-av.com uamdomain .eset.co.th uamdomain .eset.com uamdomain .malwarebytes.org uamdomain .update.microsoft.com uamdomain .mozilla.com #domain lan dns1 192.168.212.1 dns2 8.8.8.8 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 56. Fก Cloning FreeBSD 8.0 F F 55 uamanydns #nodynip statip 192.168.212.0/24 dynip 192.168.212.0/24 dhcpstart 20 // F Coova ก F 192.168.212.20-254 dhcpend 254 // F 192.168.212.2-192.168.212.19 F Fix ip F uamhomepage http://192.168.212.1:3990/prelogin uamserver http://192.168.212.1/hotspotlogin.php uamsecret ht2eb8ej6s4et3rg1ulp radiussecret wifi radiusserver1 127.0.0.1 radiusserver2 127.0.0.1 radiusauthport 1812 radiusacctport 1813 radiusnasid nas01 radiuslocationid isocc=,cc=,ac=,network=Coova, radiuslocationname My_HotSpot locationname "My HotSpot" wwwdir /var/www/html wwwbin /usr/local/etc/chilli/wwwsh coaport 3779 F กF ก F F ก F ก กก กF F CoovaChilli F ns# /usr/local/etc/rc.d/coovachilli stop ns# /usr/local/etc/rc.d/coovachilli start F Starting coovachilli F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 57. Fก Cloning FreeBSD 8.0 F F 56 ns# ifconfig -a ก F Coovachilli F F Coova F TUN0 ก F 192.168.212.1 Fก ก F 2 ( LAN) F FF ก F Fก ก F กF ˆ ก F F F Fix ip Fก F F ก F F F Printer Network F F Fix ip F F F 192.168.212.2-192.168.212.19 F F F Coovachilli ก กF F /usr/local/etc/rc.d/coovachilli stop ก Fix ip F F Coovachilli Fก F /usr/local/etc/rc.d/coovachilli start F ก กF ˆ Coovachilli ก ก F F ˈ F Fix ip F ก ก F F F F Admin F Fก F rootmysql ˈ dkil7dkk-v =k9b F กF F rootmysql F ก F ก FF ( ก F //var/www/html) 1. กF F admin/include/config.inc.php Fก F radius F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 58. Fก Cloning FreeBSD 8.0 F F 57 ns# nano /var/www/html/admin/include/config.inc.php <? php # configuration for database $_config['database']['hostname'] = "localhost"; $_config['database']['username'] = "root"; $_config['database']['password'] = " F rootmysql "; $_config['database']['database'] = "radius"; ก F config.inc.php ก กก กF 2. กF F log/ Connections/ dbconnect.php Fก F radius ns# nano /var/www/html/log/Connections/dbconnect.php <?php $hostname_syslog = "127.0.0.1"; $database_syslog = "radius"; $username_syslog = "root"; $password_syslog= " F rootmysql"; ก F config.inc.php ก กก กF 3. กF F syslog/ Connections/ dbconnect.php Fก F radius ns# nano /var/www/html/syslog/Connections/dbconnect.php <?php $hostname_syslog = "127.0.0.1"; $database_syslog = "radius"; $username_syslog = "root"; $password_syslog= " F rootmysql"; ก F config.inc.php ก กก กF F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 59. Fก Cloning FreeBSD 8.0 F F 58 ก F ก . 1. F ก Clients F ก F F F radius.sql F F ก ก F F Address F 192.168.212.1/admin 2. Login F F ก ก F F Login : admin password : passwd ก ก ก Web Mangement กF F F F 1. ก ก กF F F 2. ก ˁ ก F F F F ก ก F F F , F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 60. Fก Cloning FreeBSD 8.0 F F 59 3. ก ก ก ก ก F F F F F F Attribute F F F F F F ˈ ก F ก F F F ( F Attribute Expire-After) F F F F F ˈ ก F ก F F F ( F Attribute Max-Daily-Session) F F Max-Monthly F F F ˈ ก F ก F F F ( F Attribute -Session F F F F F F F ก F F ก F ก F F F ( F Attribute Max-All- Session FF ก F ก F F F F F ˈ ก Fก F F ˁ F ( F ก F F F ) ก ก F F ก ˁ ก ก กก F F F F radius F ก ʽ F ก F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 61. Fก Cloning FreeBSD 8.0 F F 60 F F ก กF ก F F F ก F ก ก F F ก ก ก F F F F F ก ก F F F F กF F F ˁ ก ก ก F F F F F ก F F ก F 1. ก F F กF F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 62. Fก Cloning FreeBSD 8.0 F F 61 ก ก ˁ ก F ก F ก F ˈ F PDF FF F F F F ก กF Code php F F ก F F F 4 ก ก 1 Fก A4 F F F F 40 ( F F F F ThaiPDF/exportPDF.php) F F F ก F F F F Excel F F User 1. F F F F ก Excel F ˂ F F ʽ F F F F ก F 04123 123456 F supap@tlp.ac.th 04124 123456 ก rakdee@tlp.ac.th 04125 123456 F tom@tlp.ac.th 2. ก F F F F F F F F excel F ก ก Fก Fก ก F F ก F F ก F ก ก F F ก F ก F F F F F ก F ก F F user.xls 3. F ก F F ก . ก F F ก F F F F F ก F F F F ก F m1 ก .1 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 63. Fก Cloning FreeBSD 8.0 F F 62 4. ก F F ก ก ก ก ก F 5. กก F F F F ก F F F F ก F Excel ก ˁ 6. ก F F ก F ก ˁ 7. F ก F user.xls ก ก ˁ ก F ก F F F ก F user.xls F F ก F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 64. Fก Cloning FreeBSD 8.0 F F 63 8. ก ก F F F F กก F F F F ก F Excel ก F ก ก F ก F 8.1 F ก ˁ F ก F F ก F F ( F ก F F Fก F admin กF F F F) F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 65. Fก Cloning FreeBSD 8.0 F F 64 Setup Squid Proxy Server F ก ก (squid) Fก F ก F F F ˈ F F F ก Blockweb F F F F ˈ F F F ก F Fก F F Fก squid30 F ns# cd /usr/ports/www/squid30 ns# make config F ก ˆ กF F ก [ x ] SQUID_DELAY_POOLS F F ก ก ก ก Blockweb ก Fก F F F ก Fก OK F ก ˁ Enter ns# make install clean กF ก squid30 F ......... F ก ก FreeBSD F F F squid.conf F F ก ก F F F กF F squid.conf F ก F squid.conf ns# cd /usr/local/etc/squid ns# cp /home/admin/www/ConfigWWW/squid.conf ./ F F FreeBSD F (Admin) ก squid30 ก ports F F ก กF F squid.conf F ns# nano /usr/local/etc/squid/squid.conf F กF F # ก http_port 8080 transparent // F F icp_port 3130 // F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 66. Fก Cloning FreeBSD 8.0 F F 65 cache_dir ufs /usr/cache 3500 16 256 # F ก กF F ก F cache F access_log /var/log/access.log squid # F ก กF F ก Log Files squid Fก ก F F /var/log/ cache_log /varlog/cache.log # F ก cache_store_log /var/log/store.log # F ก F acl localhost src F F กF F F F acl localnet src 192.168.212.0/24 F acl CONNECT method CONNECT F F F #ก F F F F squid30 F Blockweb F F F ก F F F F F F http://192.168.212.1/STOP/ F F ʽ acl time_block time M T W H F 08:00-16:30 acl time_block time A S 06:00-13:00 acl time_block time A S 20:00-24:00 acl bsex url_regex "/var/www/html/bsex.txt" http_access deny bsex time_block deny_info http://192.168.212.1/STOP/ bsex time_block #ก F F F F squid30 F F F F ก 50M F Error acl time_acl time M T W H F 8:00-16:00 acl time_acl2 time S A 8:00-17:00 reply_body_max_size 50 MB time_acl reply_body_max_size 50 MB time_acl2 F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 67. Fก Cloning FreeBSD 8.0 F F 66 # Block F F ก F acl limitspeed_web url_regex -i youtube.com 4shared.com .rar .wmv .mov / # ก ก F ก ก delay_pools 2 delay_class 1 2 delay_parameters 1 15000/15000 8000/8000 delay_access 1 allow limitspeed_web time_block delay_class 2 2 delay_parameters 2 512000/512000 64000/64000 delay_parameters 2 512000/512000 300000/300000 delay_access 2 allow my_network time_block ก ก F ˈ ก time_block F 65 F F our_networks F F F F Proxy F #http_access allow our_networks http_access allow localwifi F # And finally deny all other access to this proxy http_access deny all Fก ก ก ก กก กF F squid.conf F squid F Cache F ก F ก F F # /usr/local/sbin/squid -zD // F squid F cache F squid -z ก F # /usr/local/sbin/squid & // F squid ก F rc.local F ns# nano /etc/rc.local F ipfw add pass tcp from any to any 3990 via setup // ipfw add 1700 fwd 192.168.212.1 tcp from any to 192.168.212.0/24 80 // F ipfw add 1800 fwd 192.168.212.1,8080 tcp from 192.168.212.0/24 to any 80 // F ipfw add 1900 deny ip from any to any 8080 // F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::
  • 68. Fก Cloning FreeBSD 8.0 F F 67 ก F /etc/rc.local F ก กก กF ก F F rc.conf ns# echo squid_enable= YES >> /etc/rc.conf F Cache squid กF ˆ Cache ʽ F Proxy ก F F cache F ก F F F F F กF F F clearcache.sh F F ก F Cache F ns# nano /etc/squid.sh F F #!/bin/sh echo "###############################################" echo "Script Clear Cache squid30 Auto" echo "###############################################" /usr/local/etc/rc.d/squid stop /bin/sleep 10 rm -rf /var/cache/* /bin/sleep 10 /usr/local/sbin/squid -z /bin/sleep 10 /usr/local/etc/rc.d/squid start echo "#############################################" echo "Clear Cache Squid Proxy Finish" Fก F ก ก F ก กก กF ns# chmod 775 /etc/squid.sh ns# nano /etc/crontab ก F F F F F www.kroonis.org namo_nis@hotmail.com Mobile : 0-8335-26868 :. ก ก F ก ˈ F .::