目前分類:RH253 (21)

瀏覽方式: 標題列表 簡短摘要
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:請問會把臉貼到玻璃的動物?
  • 請輸入密碼:
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:請問會把臉貼到玻璃的動物?
  • 請輸入密碼:
NIS +Autofs

%沒有家目錄的問題, 要配合automont
[root@server118 etc]# su - nismicky
su: warning: cannot change directory to /home/nismicky: No such file or directory
-bash-3.2$

Nis Server: Server1
(1)開啟nfs service
(2)export : /rhome/station18

aquatower 發表在 痞客邦 留言(0) 人氣()

Nis Server

Packages

Server:
ypserv-2.19-3
yp-tools-2.9-0.1

Client:
yp-tools-2.9-0.1

aquatower 發表在 痞客邦 留言(0) 人氣()

Securing Data

Openssl

*generating digital certificates
#openssl genrsa -out server1.key.pem 1024
#openssl req -new -key server1.key.pem -out server1.csr.pem
#openssl req -new -key server1.key.pem -out server1.crt.pem


aquatower 發表在 痞客邦 留言(0) 人氣()

Network Resource Access Controls

*Netfilter
#iptables

#chkconfig --list iptables
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off

(1)Rule Targets
DROP, ACCEPT, LOG, REJECT, custom chain

aquatower 發表在 痞客邦 留言(0) 人氣()

System Service Access Controls

*chkconfig控制服務在開機後是否自動啟動
(1)
#chkconfig --list

#chkconfig name {on|off}
#chkconfi vsftpd on

#chkconfig --level levels name {on|off}

aquatower 發表在 痞客邦 留言(0) 人氣()

LAB

*Logging to a centralized loghost

%server1的log複寫一份到server118


(1) server1
#vi /etc/syslog.conf
加入 user,* @server118

aquatower 發表在 痞客邦 留言(0) 人氣()

Syslogd and Klogd Configuration

configuration: /etc/syslog.conf

Syntax:
facility.priority log_location

Ex:
mail.info /dev/tty8

aquatower 發表在 痞客邦 留言(0) 人氣()

System Performance and Security

*即時監看log
#tail -f /var/log/[logfile]

*查看網路狀態
#netstat -tupln
-n : do not resolve IP address to host name
-t : list TCP connections
-u : list UDP connections

aquatower 發表在 痞客邦 留言(0) 人氣()

LAB

1. 啟動sendmail 並修改設定 [iptables開放Port: 25)

2. 啟動dovecot並修改設定 [iptables開放Ports: 110, 143, 993, 995], create "dovecot.pem"

[root@server1 ~]# cd /etc/pki/tls/certs
[root@server1 certs]# make dovecot.pem
umask 77 ; \
PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \

aquatower 發表在 痞客邦 留言(0) 人氣()

2. Mail Relays

%允許intranet: 192.168.0.0/24使用MTA(sendmail)寄信
#vi /etc/access

# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:192.168.0.0/24 RELAY

aquatower 發表在 痞客邦 留言(0) 人氣()

Electronic Mail Services

(1)Service: Sendmail (MTA)

Packages: sendmail, sendmail-cf, sendmail-doc
Daemon: /usr/sbin/sendmail
Script: /etc/init.d/sendmail
Port: 25 (smtp)
Configuration: /etc/mail/sendmailmc, /etc/aliases, and others
Related: procmail(MDA), spamassassin, tcp_wrappers

aquatower 發表在 痞客邦 留言(0) 人氣()

5. Squid Porxy Server

Package: squid
Daemon: /usr/sbin/squid
Script: /etc/init.d/squid
Port: /etc/init.d/squid
Configuration: /etc/squid/*

1. 安裝
#yum install squid

aquatower 發表在 痞客邦 留言(0) 人氣()

4.Virtual Host (網站代管)


(1)建立目錄
#mkdir -p /var/www/html/virt1
#mkdir -p /var/www/html/virt2
並在virt1, virt2裡建立index.html檔案, 當然別忘了SElinux: #restorecon -R /var/www/html

(2)確認DNS是否正確, 增加DNS的A紀錄
[root@server118 ~]# dig virt1.example.com

aquatower 發表在 痞客邦 留言(0) 人氣()

3. Secure Directory and basic configuration

#cd /var/www/html
#mkdir secure

#cat > index.html <
> Secure page
> secure page
> ookk

aquatower 發表在 痞客邦 留言(0) 人氣()

2. 個人網站:public_html

(1)建立目錄及index.html
#chmod 701 /home/student
#su - student
[student@server118 ~]$
$mkdir public_html

%可以在/etc/skel 先設定, useradd會自動幫user建立public_html目錄

aquatower 發表在 痞客邦 留言(0) 人氣()

Apache Web Server

Packages: httpd, httpd-devel, httpd-manual
Daemon: /usr/sbin/httpd
Scripts: /etc/init.d/httpd
Ports: 80(http), 443(https)
Conriguration: /etc/httpd/*, /var/www/*
Related: mod_ssl (for https)

%SElinux

aquatower 發表在 痞客邦 留言(0) 人氣()

3. Samba Services

four main service
. authentication and authorization of users
. file and printer sharing
. name resolution
. browsing

related
. smbclient

aquatower 發表在 痞客邦 留言(0) 人氣()

2. Network File Service(NFS)

Packages: nfs-utils
Daemons: rpc.nfsd(1),rpc.mountd(1),rpc,rquotad(1),rpciod(1),rpc.statd(2),rpc.lockd(2)
Scripts: /etc/init.d/nfs(1),/etc/init.d/nfslock(2)
Ports: 2049, Others assign by portmap(111)
Configuration: /etc/exports
Related: portmap, tcp_wrappers

#rpcinfo -p (verify that(RPC) service are running)

aquatower 發表在 痞客邦 留言(0) 人氣()

1 2