Internet Server RedHat 7.2 1
INTERNET
internet
1. Dialup
MODEM
ISP ppp (Point to Point Protocol)
MODEM
ISDN
LAN
internet internet share
internet
Internet Server RedHat 7.2 2
2. Lease Line
Dial up Lease line
64 k , 128 K , 256 K
lease line
Router gateway ISP
internet server
Client# 1 Client# 2 Client# 3 Client# 4 Client# 5
internet Lease Line
Dial Up
Internet Server RedHat 7.2 3
1.
Server WEB Server Proxy
Server , Mail Server option
2. Hardware
Hardware
3. Network
network network
4. Network
IP IP Router , Domain name , Name server
5.
Linux Redhat 7.2 CD ROM 2
Internet Server RedHat 7.2 4
Dom ain Name
IP ADDRESS
Netmask
Network
Broadcast
Hostnam e
Gateway(router)
Primary DNS
Secondary DNS
Ternary DNS
Dom ain Name
IP ADDRESS
Netmask
Network
Broadcast
Hostnam e
Gateway(router)
Primary DNS
Secondary DNS
Ternary DNS
Internet Server RedHat 7.2 5
1. Setup BIOS Boot CDROM BIOS Boot
2. Redhat CDROM #1 Boot
Text Mode option enter Graphic Mode
3. enter graphic Mode
NEXT
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
4.
Internet Server RedHat 7.2 6
NEXT
*** setup root command prompt
/usr/sbin/kbdconfig
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 7
5. Mouse
Mouse NEXT
*** setup root command prompt
/usr/sbin/mouseconfig
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 8
6.
Server Next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
7. partition hardisk
Internet Server RedHat 7.2 9
Automatically partition
harddisk
patition next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 10
Remove all partitions on this system
OS multi OS partition
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 11
partition partition
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 12
patition ok next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 13
8. Boot
Use LILO as the boot loader boot linux
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 14
9. network
lan card 2
eth1 next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 15
10. firewall
Customize Trusted devices Allow incoming
setup root command
prompt next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 16
11.
default English(USA)
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 17
12. time zone
ASIA/BANGKOK
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 18
13. ห root password
user next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
14. login
Internet Server RedHat 7.2 19
password
authenticate default
setup root command prompt
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 20
15. package
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
16. VGA card
Internet Server RedHat 7.2 21
VGA card )
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
17. package
Internet Server RedHat 7.2 22
package Redhat
CDROM
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 23
18. boot disk
skip boot disk creation ( boot) boot
( Boot )
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 24
19. monitor
next
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 25
20. boot graphic mode
login text mode config text mode
graphic mode startx command prompt
next boot eject CDROM
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
…………………………………………………………………………………………………………………….
Internet Server RedHat 7.2 26
Network
Redhat 7.2 login root root
command prompt network
ifconfig
network interface lan card Modem
lan card 2 ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:03:18:5E:F1
inet addr:203.146.119.139 Bcast:203.146.119.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:203667 errors:0 dropped:0 overruns:0 frame:0
TX packets:234092 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:137299190 (130.9 Mb) TX bytes:33646660 (32.0 Mb)
Interrupt:5 Base address:0x2400
eth1 Link encap:Ethernet HWaddr 00:00:21:24:21:BA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:271940 errors:0 dropped:0 overruns:0 frame:0
TX packets:258842 errors:0 dropped:0 overruns:0 carrier:0
collisions:1027 txqueuelen:100
RX bytes:37975429 (36.2 Mb) TX bytes:207488328 (197.8 Mb)
Interrupt:5 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8650 errors:0 dropped:0 overruns:0 frame:0
TX packets:8650 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1719479 (1.6 Mb) TX bytes:1719479 (1.6 Mb)
Internet Server RedHat 7.2 27
network
netconfig root command prompt /etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
( vi pico )
ping
host
PING 203.146.119.129 (203.146.119.129) from 203.146.119.139 : 56(84) bytes of data.
64 bytes from 203.146.119.129: icmp_seq=0 ttl=255 time=2.121 msec
64 bytes from 203.146.119.129: icmp_seq=1 ttl=255 time=2.077 msec
64 bytes from 203.146.119.129: icmp_seq=2 ttl=255 time=1.911 msec
64 bytes from 203.146.119.129: icmp_seq=3 ttl=255 time=2.036 msec
PING 203.146.119.130 (203.146.119.130) from 203.146.119.139 : 56(84) bytes of data.
From 203.146.119.139: Destination Host Unreachable
From 203.146.119.139: Destination Host Unreachable
From 203.146.119.139: Destination Host Unreachable
From 203.146.119.139: Destination Host Unreachable
ping ping host host
ping router ping host ISP host
router network
route , traceroute ( )
ping ping
( config ip class 1)
Internet Server RedHat 7.2 28
network
protocol TCP/IP
ip ip
ip ip
ip forwarding ip masquerading /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/ipchains -F
/sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ
rc.local file autoexec.bat dos ipchains
ipchains firewall
rc.local run Boot
. /etc/rc.d/rc.local
ห ping client
ip ห host lan
Internet Server RedHat 7.2 29
Setup Web Server
network
config config web Server
web server
web
ntsysv root command prompt “*” httpd service
start Boot Boot
service httpd start
service httpd restart
( config )
web server Apache
Apache
Linux RedHat 7.2
/
/usr/sbin/httpd run web server
/etc/httpd/conf default config Apache
/var/www/html default HTML
/var/www/cgi-bin default CGI
/var/www/icons default
/var/log/httpd default
log file)
/etc/httpd/conf/httpd.conf config Apache
Internet Server RedHat 7.2 30
config brower
web server
Web site /var/www/html default
root upload HTML
1. user 1 user web site user www
user
adduser www ( user www home directory /home/www)
passwd www password user www login user www
2. /etc/httpd/conf/httpd.conf
DocumentRoot “/var/www/html” DocumentRoot “/home/www”
HTML /home/www home
directory user www
Internet Server RedHat 7.2 31
3. service httpd restart ( start Apache config)
4. chmod 755 /home/www ( )
web site
/home/www user www upload
ftp ftp Absolute FTP , Cute FTP
ห Homepage
user homepage
1. public_html home directory
2. chmod 755 /home/ user
3. Upload HTML /home/ user/public_html
browser http://www.ptech.ac.th/~poo
( www.ptech.ac.th web site poo user)
( add user chmod)
Internet Server RedHat 7.2 32
setup DHCP Server
Dynamic Hosts Configuration Protocol config
TCP/IP ip
ip linux Redhat 7.2
package dhcpd package
CDROM
1. RedHat CDROM CD-DRIVE
mount /dev/cdrom mount cdrom
rpm –ivh /mnt/cdrom/RedHat/RPMS/dhcp-2.0pl5-8.i386.rpm
package
umount /dev/cdrom unmount cdrom
CDROM
2. dhcpd.conf config dhcpd
pico /etc/dhcpd.conf ( vi editor )
server-identifier ns1;
default-lease-time 48000;
max-lease-time 120000;
option domain-name "ptech.ac.th";
option subnet-mask 255.255.255.0;
option domain-name-servers 203.146.119.139, 203.146.15.9;
# eth0
subnet 203.146.119.0 netmask 255.255.255.0 {
option broadcast-address 203.146.119.255;
option routers 203.146.119.129;
}
# eth1
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.11 192.168.0.254;
Internet Server RedHat 7.2 33
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
}
3. ntsysv “*” dhcpd service start boot
service dhcpd start service dhcpd restart start service
boot
windows protocol TCP/IP
add config
winipcfg ip
ip dhcpd.conf
network protocol TCP/IP
remove add
network dhcp server
Internet Server RedHat 7.2 34
setup proxy server
proxy server
1. web site
2. web site
proxy server proxy
proxy
squid
linux RedHat 7.2 squid proxy server
config setup
proxy server
1. /etc/squid/squid.conf
pico /etc/squid/squid.conf
http_port 8080
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 32 MB
cache_replacement_policy lru
memory_replacement_policy lru
#########################################
( /var/spool/squid harddisk 10000 MB.)
cache_dir ufs /var/spool/squid 10000 16 256
#########################################
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
emulate_httpd_log on
acl all src 0.0.0.0/0.0.0.0
#########################################
Internet Server RedHat 7.2 35
( squid personel network 192.168.0.0)
acl personel src 192.168.0.0/255.255.255.0
#########################################
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#########################################
( url sex , nude , xxx)
acl lock url_regex -i sex nude xxx
( lock.txt /etc/squid/ url
)
acl lock1 url_regex '/etc/squid/lock.txt'
http_access deny lock
http_access deny lock1
#########################################
http_access allow localhost
Internet Server RedHat 7.2 36
#########################################
( personel )
http_access allow personel
#########################################
http_access deny all
icp_access allow all
miss_access allow all
cache_mgr root
cache_effective_user squid
cache_effective_group squid
#########################################
( transaparent proxy # )
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
#########################################
logfile_rotate 9
log_icp_queries off
ie_refresh on
2. squid
squid –zD
config error message
3. ntsysv “*” squid Boot
run squid
service squid start service squid restart
config restart squid
squid –k reconfigure
Internet Server RedHat 7.2 37
4. internet Explorer browser
menu tools -> internet options -> connections
LAN Settings
Internet Server RedHat 7.2 38
ip proxy server port ok
transparent proxy
proxy proxy
browser set proxy proxy
transparent proxy proxy server set proxy
browser
1. squid.conf
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
2. /etc/rc.d/rc.local
/sbin/ipchains –A input –p tcp –s 192.168.0.0/24 –d 0/0 80 –j REDIRECT 8080
squid
Linux RedHat 7.2
/
/usr/sbin/squid run proxy
/etc/squid default config squid
/var/log/squid default log file
/var/log/squid/errors default HTML
/etc/squid/squid.conf config squid
Internet Server RedHat 7.2 39
log file
pico /var/log/squid/access.log
192.168.0.12 - - [06/Jun/2002:15:42:25 +0700] "GET http://qpcnet.com/akira/images/more.gif HTTP/1.1" 304 207
TCP_IMS_HIT:NONE
192.168.0.12 - - [06/Jun/2002:15:42:32 +0700] "GET http://qpcnet.com/hardware/images/23.gif HTTP/1.1" 200 2492
TCP_MISS:DIRECT
TCP_IMS_HIT:NONE cache /proxy
TCP_IMS_MISS:DIRECT cache/proxy
Internet Server RedHat 7.2 40
setup name server
internet ip web server
web server server
zone
zone domain name
DNS (Domain Name System) domain
domain
“name server” linux RedHat 7. Bind
name server name
server
1. domain thaiNIC
web site http://www.thnic.net
- Domain ptech.ac.th
- name server ns1.ptech.ac.th
- ip name server
-
2. setup
name server Bind
2.1 /etc/named.conf
/etc/named.conf
## named.conf - configuration for bind
#
# Generated automatically by bindconf, alchemist et al.
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
include "/etc/rndc.key";
options {
directory "/var/named/";
Internet Server RedHat 7.2 41
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "119.146.203.in-addr.arpa" {
type master;
file "119.146.203.in-addr.arpa.zone"; ( /var/named)
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone "ptech.ac.th" {
type master;
file "ptech.ac.th.zone"; ( /var/named)
};
2.2 forward zone /var/named/ptech.ac.th.zone
forward ip
/var/named/ptech.ac.th.zone
$TTL 86400
@ IN SOA ns1.ptech.ac.th. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
Internet Server RedHat 7.2 42
86400 ; ttl
)
@ IN NS ns1.ptech.ac.th
ns1 IN A 203.146.119.139
www IN CNAME ns1
nhunui IN CNAME ns1
2.3 reverse zone /var/named/119.146.203.in-addr.arpa.zone
reverse ip
/var/named/119.146.203.in-addr.arpa.zone
$TTL 86400
@ IN SOA ns1.ptech.ac.th. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)
@ IN NS ns1.ptech.ac.th.
139 IN PTR ns1.ptech.ac.th.
3. ntsysv “*” named service start named Boot
boot
service named start
service named restart
Internet Server RedHat 7.2 43
/
/usr/sbin/named run DNS
/etc default config DNS
/var/named default zone
/etc/named.conf config DNS
name server
nslookup
nslookup 203.146.119.139
Server: 203.146.119.139
Address: 203.146.119.139#53
Non-authoritative answer:
9.15.146.203.in-addr.arpa name = iris.moe.go.th.
9.15.146.203.in-addr.arpa name = gpa.moe.go.th.
Authoritative answers can be found from:
15.146.203.in-addr.arpa nameserver = ns.tnet.co.th.
15.146.203.in-addr.arpa nameserver = iris.moe.go.th.
iris.moe.go.th internet address = 203.146.15.9
nslookup www.moe.go.th
Server: 203.146.119.139
Address: 203.146.119.139#53
Non-authoritative answer:
www.moe.go.th canonical name = mali.moe.go.th.
Name: mali.moe.go.th
Address: 203.146.15.99
Internet Server RedHat 7.2 44
setup GNOME
config bind DNS GNOME
graphic mode config
config startx graphic mode
GNOME
1. Forward Master Zone Main menu
Program -> System -> DNS Configure menu Bind Configuration Tool
Add menu Forward Master Zone
Domain name OK menu
Internet Server RedHat 7.2 45
Records Edit Add Name Servers Mail
Exchangers menu OK
menu
Add Records menu host name ip address
Add Alias
host ns1.ptech.ac.th web server Alias www
www.ptech.ac.th website
OK Menu Bind Configuration Tool
Internet Server RedHat 7.2 46
2. Reverse Master Zone Add Menu Bind Configuration Tool
menu Add menu Reverse Master Zone
ip 3 . . OK
menu
Add Name Servers ( .
Domain Host)
Add Reverse Address Table ip
Full Host Names OK Menu Bind Configuration Tool
menu File -> Apply ->EXIT
Internet Server RedHat 7.2 47
config nslookup
host
setup Mail Server
Mail server
SMTP mail box – mail
– mail outlook
mail box pop3 imap
service ntsysv mail add record
mail server DNS add MX record (Mail Exchanger)
( )
(Security system)
lan
card 2 setup Firewall Linux RedHat 7.2
Firewall setup root
command prompt firewall menu
High level medium level no firewall custom ( )
Internet Server RedHat 7.2 48
Server web
(Web Administrator)
server browser
webmin website
http://www/ptech.ac.th:10000