Professional Documents
Culture Documents
Bandtec Redes Locais PDF
Bandtec Redes Locais PDF
"
# $ % & ' () * +
, $ -
. - / 0 1
2 3 4 5 6 (235*
+ 7%
1 8 ( *
9 )( * 1
9 )6 - 9
9+ ) : ;3
" % < 48 5 6 "
" %85 "
= >85 ; ( * =
= >85 =
? %> +1
? %> +1
+
+
@235 ( 6 235*
+7 % < 4 ( *
+ 7%
$ 2A% B7B 66 $
1 8 "
9 ) 1
8 5C 1+
" %85 1
= 5 $ 1
? %> 9
9
5 )B 9
& D; $ & D ?
+#3 E 7
, 6- 6
$ 3% 5 2 "
9 , $ 3% 6 =?
9+#F 6 ( * 3% =1
1 > - =
# $ =
% ?
+ > ?9
8@ # 8
2@ , 2 6
;5 ,; 5 6 $
;5 9 , ; 5 6 !
3) 5 , 3: 6) ; $ 5 6
;32 # ; #3 2
; &5 # ; & 5 6
, 2 5 6
>.3% , > :. $ 3 %
B !, 6 :B - 6 !
7% , 7 % < 4
), 6 - )
2 #2 # - # 6: :
3 ,3 -
%85 , % < 4 8 5 6
A8 , A 8
>85 , > 8 $ 5 6
3, 6 3 6 :
3% , 3 % :
B 6 G 6 $
6 H '
6
/ H 5 H
$6 6 H$ B
H 6 $ H
!
" #
•
•
•
•
•
•
•
•
$%&
&'( & )
*
#
! " # $ % &
'( )* '+ ) '(
! " ,- #
./ 0 )* (+,/+, + ./
$ % &
12( " - 3 '4 " 5 2"
1 5 + 6 2 7 (
'(-( , /
$ , /& '(-( ( " # $ % &
+%, "
! & !
- #
# ls /lib/modules/`uname -r`/kernel/drivers/net
3 0 " % 3 3 % ? 3
7 " " 3 %"6 )
7 " 3 5 "? 74 3 @
74 % 3 3 @ " 6
5""4 3 0 3 74 5 3 @
A 3 5 6 3
7 " % 3 % 7 3 6
0 3
. " ! !
/ 0 ! 1*
' ! 1
* #
# modprobe nome_do_módulo
! #
# lsmod
5 ' B < 4
05 ; :* )
% *;)
* :
0 ; ;*
0 ) )8)
0 ? 8 0 C 0
5 7? )* ) 0 C 0
0 7 );*): 0
3 ;*) ; 0 C 0
5 *)*) ; 3 C 5 7? C 0 ? C 0 C 0
;
4 0 8 *
; 8;
2%3 " !
) * 1
# ifconfig
. 1
4 ' (& 35675 1
7 7 D%
> > , 7 , * * : *
' > , 7 , * * : *
' ' 3 ,0 3
. . ' E1/F 7 88 88 88 88 ;* % ;
. F/G</'- 7 88 88 88 88 ;*
. E /F 0 " 8
. ( = 0 " 8
5 8 ; @ ;:;:
0 (& 1 " *
#
H 0 0 7
7 > 3 / 7 I * * : *
8 ; + 8 *
3 88 88 88
; 0 *00 0 * : * ,; ' > 3
< +FE(. ('- F<!! !2 <>- ('- -< 8
F 3 * 8 % 5 0 "
- 3 ) % 5
6A5 5
F 4 8)8 : $ * 8 = +& - 4 $ = +&
; % & 1 )
#
< (& = 0
= % < ) *
3 1
< # 1 )
; 7 0 *00 0 :0 )
>%3 1 1 ) 1 #
# arp -a –n
J $ 8 :& ; *; ) 7 # 7
J $ 8 ) & * * ; 7 # 7
? % @ 0 "
) #
# route -n
(Lista as Rotas Presentes no Sistema)
A * ! 1
" BBB
& " " 1 9/, *
) 6
# vi /etc/resolv.conf
" %
" %
$C % 3 ) !
"
B D 9 B D 7 : 6'
& " "
"
9 #
# vi /etc/network/interfaces
5
0 3
5 7
0 7
: ;
" 3 88 88 88
: ; 88
! @ 3 : ;
@ 4 : ; 8
" %
EF 9:'& G
EF' (& = 1 ) " G
' < 67 : #
% , , 4 0 , @ 3 , 0 0 7
./1 /K 7
+EE- FE-EK
I(..FK 8 : / ).
(..FK
!/- ('=K 88 88 88
2(-/I(LK
E!+EE-K4
-L /K/ 7
EF 9:'& G
EF' (& = 1 ) " G
$$ * ' / 4 " F: G
$%& #
# hostname algum_nome
+%& ! ) * #
# vi /etc/hostname
2*H )
# ls /etc/rcS.d/
$+ % '
$ %3 1 1 .
1 " IJ9/ F K "
G 0 " "
" 6 " )
# vi /etc/hosts
* 7 " 7
8 " 666 "
+*/ " 1
$C +; $?C $C B K
EF<L,# 1 M 4
& * ) #
7 " 0
%0 ) . "
! " # $
%&$
%' (
+%
9 P Q
2%3 " #
M> 56 , ,%" 5B ) " ; K<< .K:)0 ); 0
8* N ;; 8 80 A5 O
8%& I$C
; % H " 0
P6Q #
" 5 D " 5 C @ ,
=%( " 6 6 B
P , , 7 @
3 7
Q$ & , @
> % H "
6 6 B#
P , , 7 @
?% 7 H4
A% 7
%' ) * + &
9 , , F, K G
/ N ) 9 #
F %3 L N ' <,G
F % ! 1 )
G
$%3 "
& R < )
F %3 ! G
+% ! P * Q " *
9 )
2%& * " 6
" ) ! "
, " S #
" 5 D " 5 C @ ,
@
R 7 S
RF 7 S
5 7 , 5
T B
4 <, 5 I L,9
' ) #
• . 3
• (
• !"
• 3
•
No Debian
# dpkg -l | grep rdesktop
No RedHat/CentOs
# rpm –qa | grep rdesktop
2%& )
# xrdesktop 10.10.10.1
I I! 4 / 6 ;5 9
' ) #
• . 3
• !"
• % % @
• (
$% & * *
Em sistemas Debian
# dpkg -l | grep xvnc4viewer
Em sistemas RedHat/CentOs
#
+%9 * H/'
2%7 )
Em sistemas Debian:
# xvnc4viewer 10.10.10.1:1
00%( )(-1 23 1
" <7
($ !, $< 2 G 6 ! *
,5 H #
% 3
""
% 2 ) J I
45" ""
& 1
#
R % S
R % S R 5 B S
' ) #
• ' 7
• '
• ' 7 3 4
• ' 7 4
# ssh <hostname>
# ssh <usuário>@<hostname>
+%' 1 1 )
" 1 1 #
' 1 " 6
2%3 1 1 ) ! " ! 1
,,: #
8*& ! #
# $ %
O 1 0
" 0
"
********
*******
4 " ,
7 ,,:
$%& &
7, * ) #
# ssh-keygen -t rsa
H, 7, ? 5 7,
# ssh tux@192.168.0.100
# cd .ssh/
8%& 1 ) " )
# ssh !K = 9" ? ??
4 0 !!* 5 6(
& S : ) * * K*
$%7
+% ! 1 ,,:*' K*(9
[ * K* * 6 Y \, Y Y V
' ) #
• *
• ]
• /
•
( /3&
No Debian:
# apt-get install ntpdate
No RedHat/Centos
# yum install ntpdate
H /3&
# ntpdate ip.ip.ip.ip
!
O ,O/ "
O " "
D O I3& FI 3 & G1 "
S " S 1 )
• 0
$%& * #
[ \ * * V
+%, 3 )
K )
# ftp localhost
Connected to localhost.
220 ProFTPD 1.2.5rc1 Server (Debian) [debian.4nix.com.br]
Name (localhost:root): anonymous
331 Anonymous login ok, send your complete e-mails address as your
password.
Password:
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq0
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq1
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq10
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq2
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq3
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq4
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq5
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq6
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq7
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq8
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq9
226-Transfer complete.
226 Quotas off
ftp>
+%& ) ) I3&#
ftp> help
' K ' #
& 1 ) U
" 0 #
ftp> ? put
put send one file
• ! "
• # $ !
• ! "
• # $ ! "
• % & ' "
) I3&#
) I3&#
ftp> lcd
Local directory now /root
ftp> lcd
Local directory now /home
ftp> !ls
cacula careca flavio ftp john xninja pirulao
I3&
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq0
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq1
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq10
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq2
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq3
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq4
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq5
-rw-r--r-- 1 0 root 10 Jul 2 22:06 arq6
-rw-r--r-- 1 0 root 10573734 Jul 2 22:01 arq7
-rw-r--r-- 1 0 root 10364687 Jul 2 22:01 arq8
-rw-r--r-- 1 0 root 0 Jul 2 20:50 arq9
226-Transfer complete.
226 Quotas off
B I3&#
B " I3&
ftp> lcd /tmp
Local directory now /tmp
ftp> mget *
mget arq0? y -> perceba, é pedida uma confirmação para cada arquivo.
200 PORT command successful.
150 Opening BINARY mode data connection for arq0.
226 Transfer complete.
mget arq1? y
200 PORT command successful.
150 Opening BINARY mode data connection for arq1.
226 Transfer complete.
mget arq10? y
200 PORT command successful.
150 Opening BINARY mode data connection for arq10.
226 Transfer complete.
. 1 B
1
"
O ,O/ "
O " "
D O , 1 1 ) .
^
' ) #
• F 0
• '7 @" 5
• "
"
7&'
. " #
#rpcinfo -p localhost
programa versão protocolo porta
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 2 udp 2049 nfs
100021 1 udp 1051 nlockmgr
100021 3 udp 1051 nlockmgr
100021 4 udp 1051 nlockmgr
100005 1 udp 1052 mountd
100005 1 tcp 1171 mountd
100005 2 udp 1052 mountd
100005 2 tcp 1171 mountd
. 1
B
#showmount -e localhost
< 1 /I,#
# nmap -sR -n -P0 192.168.0.100
/, F/ , G#
# nmap --script rpcinfo 192.168.0.100
/, F/ , G#
# nmap --script nfs-ls 192.168.0.100
& 1 " 6
) ,4L F, 4 L DG " 1 1
) 4 &
1 ) 4
' ) #
• . 3
• F "
• (
• L5"
• !"
• '"
• " " 5
$%& * #
Em Sistemas Debian:
Em Sistemas RedHat/CentOs:
# rpm –qa | grep samba-client
Em caso de ausência:
Em sistemas Debian:
Em sistemas RedHat/CentOs:
+%. 1 #
" : ; 6
H #
# smbclient -L 192.168.0.100 -N
2* ,4L6'(I,
G' ,4L6'(I, #
# smbclient -L 192.168.0.100 -N
G /, F/ , G#
# ## 6 192.168.0.100
G /, F/ , G#
# ## 6 # # 6 : 192.168.0.100
G /, F/ , G#
# ## 6 # # 192.168.0.100
G /, F/ , G#
" " % 4 : ;
G /, F/ , G#
G /, F/ , G#
G /, F/ , G#
G /, F/ , G#
" " % : ;
G /, F/ , G#
8% 1 1
" ) ,4L 1 #
< "
1 79& 1 579& < 579& 1 79&
F7 9 D & G
' ) ! #
• 3
• "
•
• 45"
•
• 7
• % "
• %
• 0
• 05
•
• "
$%< " ) 1
79&
No Debian:
# dpkg -l | grep rdp
/" " F ,
" DA T
+%' F 79& G 0
/" " .
/" " F , ) +
@ 7 ,, @ 0 U , 5 , ,;, ) ;,
; 7 "
" %7 ; 7 "
45"
45" 6
/" " F , ) +
@ 7 ,, @ 0 U , 5 , ,;,6 ;?; ,
; 7 "
" %7 ; 7 "
45"
45" 6
' <
S ! /
! " 2+
=8 1 M
) !
8% ) *
" #
# vim /etc/xrdp/xrdp.ini
;%& " *
* #
# lsof -n -i :3389
=%9 79& 1 *
1
< H/'
) O H/' 1 )
O/(5 F G 4
T B 4 <, 5
%!
6 E
• 4
•
• #
• :
•
• 6-
•
• 6
• 6
• $
• $
•
•
$%& * S H/'
No Debian:
No RedHat/Centos
/" " .
/" " F ,
45" % %
# " 6 6
" ) 1 "
8%' 1 H/'#
Em sistemas Debian:
Em Sistemas RedHat/CentOs:
;%& H/'#
# lsof –n –i : 5901
# fuser –v 5901/tcp
=%H H/'
9 * )
" )
$%(
#. dialog 0
+%
# rcconf
< # 9 1 ) *
" D !
) O #
* * \ V
/ 1 "
) 3
)
0
%!
< 1 ) . )
" < 1
" P Q 9
" )
"
' ) #
• 9 D
• 7
• ]
• H
• /
• I
•
$*& 1 #
No Debian:
# dpkg -l | grep telnet
Em sistemas RedHat/CentOs:
# rpm –qa | grep telnet
' 0 _
/ 9 #
/ ' < 67 :
45" % 6
+*< 9 1 )
" * "
6 6
# vi /etc/inetd.conf
@ 7 : 6' < 1
! * 6 " 6 6
#
0 5
-7 % % V 5 N
5 4 5 " , @ 0 5 7
%
W
0 K F/<'/
3 ? 4 K "
@ K
5 K
% K ,5 , ,
? ?0 5 XK <'/F .
K
Y
H "
*V " 6 6
2 *V D
B " D
) *V ) " "
6 6
3 F 6 G *V 1 "
F G " B
! ! *V "
3*2 32# 3 ! *V
3'& T 1
2*< 0 9 *
3
No Debian
# /etc/init.d/inetd restart
No RedHat/Centos
# service xinetd start
8%9 * *
# fuser -v 23/tcp
;*O )" D
&
< #&
%!
' ) #
• Dpkg
• Rpm
• Apt-get
• Yum
• Vi
• Netstat
• fuser
$%& * #
+%/ S #
2%/ " 1
#
# vi /etc/ssh/sshd_config
4 5' + % "" *V ` `
F G
+ 6 "" *V * ,,:
2CC
' 77* 8 5 2 *V 1 1
F $G
*# 57* 8 5 2 *V 1 1
F +G
1 ) 5 22 !2 *V
22 !7* 8 5 2 *V & "
0 K ,,:
3
8% ! *
Em sistemas Debian:
# /etc/init.d/ssh restart
Em sistemas RedHat/CentOS
# service sshd restart
;%9 * * #
*& &
*, &
*3 &
# fuser -v 23/tcp
9 : )) 2
< 3'& T )
) a
" #6 6 BF
(& G 6 6 K F
(& G
in.telnetd : ALL
+% "
* #
" 6 6 B
8% 0 "
#
#3 " #
sshd : ALL
< " 6 6 B S
6 6 K
%!
< /3& !
S O3' F: O ' G
1 /3& ( )
!
" "
< C 1 "
" F N&, ! b G
$ )
"
/ + )
$
* /3& 1
)
) "
• . 3
• F "
• (
• L5"
• 2
• 1 ,% "
• 5
• > 0
• !
• !"
•
$%H /3&
9 #
3 D T
/" " F , E
" DA T
+%' 0 * *
Em sistemas Debian:
# apt-get install ntp
Em sistemas RedHat/CentOs:
# yum install ntp
2% (
, , %
),5 ! @ 3 - "
), ! @ 3 - "
) /3& 1 ) " 6 6 #
# vim /etc/ntp.conf
/3&#
;% ! * /3&
Em sistemas Debian:
# /etc/init.d/ntp restart
Em sistemas RedHat/CentOs:
# service ntpd restart
=% ! )
* /3&
# fuser –v 123/tcp
# lsof –n –i :123
# netstat –nltp | grep :123
>%H
?%H ) )
# tail -f /var/log/syslog
%! - )!
' ) #
• 3
• "
•
• 45"
•
• % ,% "
•
• 05
• 7
•
$*H " S
4 9 #
# dpkg -l | grep proftpd
( ) *+
, -
+%' 0 * *
9 #
# apt-get install proftpd-basic
( ) *+
45" 0
2*' ) I3&
/ 7 * " " "
! 6 6
# cp /etc/proftpd.conf /etc/proftpd.conf.bkp
+G H ) " 6 6
# vi /etc/proftpd.conf
0/ &
standalone
7/ 9
User nobody
Group nogroup
8/ 9 O4 ,- !
022 022
4/ 9 1 +C M I3&
MaxInstances 20
9/ 9 ! )
DefaultRoot ~
:/ : 1; K
MaxClients 5
;/ ' *
" " B
# vi /home/usuario/welcome.msg
</ I ! "
# cp /etc/proftpd.conf /etc/proftpd.fucional
# cat /etc/proftpd.conf | grep -v ^# | uniq > /etc/proftpd.sem
# mv /etc/proftpd.sem /etc/proftpd.conf
$$ % & & #
#/etc/init.d/proftpd stop
#/etc/init.d/proftpd start
$+ % ' 1 1 D*
#
# netstat -nltp
?%& ) 1 "
& * ) % )
# tail -f /var/log/proftpd/xferlog
" %!
& *
' ) #
• 3
• "
•
• 45"
• %
•
9 #
# dpkg -l | grep nfs
!" # $ %
& #
9 #
# apt-get install nfs-kernel-server
&
' (( % ) (
& & * + * % +, -. *
+,
: /I, #
!5 .- / %3 0
" 1 )
5 %&
1 1
! ) * /I,#
, 9 #
/etc/init.d/portmap restart
/etc/init.d/nfs-kernel-server restart
' < 67 : #
[ *
! =
& /I, *
3'&B 9 * 7&'
B
[ 6 6 6
< " ) #
[ 6 6 6
1 F G 1 "
6 6 K " 1
" 6 6 B 9 1 )
1 #
echo "portmap: ALL" >> /etc/hosts.deny
echo "portmap: 192.168.100.0/24" >> /etc/hosts.allow
# %
' 0 ,
T B 6O 1 '(I,6,4L
: 0 , * 8C "
2C 1
4
9F 9 KG
$* " " *
S
9 #
"
' < 67 : #
45" "
+% ! 1 " ,
"
& * D " #
, , " , " 0 , , " , " 0
2% " #
#
@ 3 5 K >(!
% K ' " ' % 1 Z%
" K F7"' %
0 0 " 7 % 7 @ 3
@ 5 K L
" 5 7 K L
' ' % E #
5 4 K 5
3 K "
< " *
M 0 "
' M
#
> ? $
T D %9 ,
, , %
/ L / %/ / L
T , %, T
' 4 %& M
" T B A;6A?
& ? ! =
, K%/ " 1
& 9, 9 F
4 , G
& D %9 D )
> ? "
c' d%/
& *' )
H *O " F/
G
T %&
7 K%(
N D%&
& %, b
' D%I
"
9 K D%I
!
8% ! 1
"
1 1 #
"
;%& * 9 * ) #
% "
=%& 1 1 )
#
# lsof -n -i :137 -i :138 -i :139
$ 7 7 1
< 1 , T ) "
) T
@6 =
H " #
9 #
# dpkg -l | grep apache2
7 #
O #
# vi /etc/apache2/apache2.conf
%. !
ServerRoot “/etc/apache2”
%& *
T #
MinSpareServers 3
0@ O 1
MaxSpareServers 6
StartServers 2
8%. "
MaxClients 180
4@' 9 K
0
& 9
7 : 6' <
9%. 1 )
" 9 7 : 6' <
Listen 80
2*( ) #
9 #
# /etc/init.d/apache2 stop
# /etc/init.d/apache2 start
B 2 ) J I
# service httpd restart
' < 67 :
[ e
;*' " B
# netstat -nl | more
$ ; !< - ; !< *2
/ 9 #
<4 Y( 4 Y, )
$%: Y Y
" 0
" 5
+%
, , 7
2% 1 #
7 ,, * , % 5
5
7 ,, * , % 0
8%: 1 :
6 6 +6 * 6% 9 K B
R> , % 0 S
' % 0
E 4C @
( @ 0 "
( @ 0 " *
( @ 0 " : ,
R,> S
R, 0 5 S
/ 7 :
$%9 * 6 6 6 6 ' 0
" * *
R> , % 5 S
' % 5
E 4C @
. 4 0 "
( @ 0 " 4 5 ? " "
R,> S
/6 ' 5 E
R> , % 0 S
' % 0
R,> S
R> , % 0 S
' % 0
E 4C @
. 4 0 "
( @ 0 " 4 5 " 4 "
R,> S
+%7
% 7
2% 1 #
7 ,, * , % 5
7 ,, * , % 0
8%& 1 : #
- 7
$ $ = 7) 8 $ 2*)
$*( ;#
, 9 #
# apt-get install php5
# apt-get install libapache2-mod-php5
' < 67 : #
@ 7 ,, 0 U , 5 , ,*,6 ;?; , ,
* 8 7 "
@ 7 ,, " 0 " ", , "
* "
" <%7 " *[ " *[ "
45" 7 3 5
45" 7
% 7
+%9 * ! &:& #
# ls -l /etc/apache2/mods-enabled
2* ' ! &:& 0 1
# a2enmode php
9 * ! ! D
! ! *
7 @ & 1 M "
6 6 ;6 +6
# vi /etc/php5/apache2/php.ini
safe_mode = On
safe_mode_gid = On
8%& *
B 1 "
" M & %
7 MJ 7 O S ,% ,@@@, 7 0 7 V 7 M 7 0 $&
SS ,% ,@@@, 7 0 7 V 7 MJSO SS
,% ,@@@, 7 0 7
'# ( & %) *
9 ! #
/etc/apache2/sites-available - / ! "
!
"
/etc/apache2/sites-enable * " D , !
6 6 +6 * "
$%'
# vi /etc/apache2/sites-available/[seu-nome]
# Hosts Virtuais
NameVirtualHost www.[seu-nome].xxx.br
<VirtualHost www.[seu-nome].xxx.br >
DocumentRoot /var/www/[seu-nome]
ServerName [seu-nome].xxx.br
ServerAdmin webmaster@[seu-nome].xxx.br
ErrorLog [seu-nome].xxx.br-error.log
CustomLog [seu-nome].xxx.br-access.log common
</VirtualHost>
+ % . D ! 6 6 +6 *
6 6 +6 *
# a2ensite
9 * " 0 *
2%9 * 1 !
# mkdir /var/www/[seu-nome]
8%7
# /etc/init.d/apache2 restart
@ 7 : 6' < 1 #
$%9 * H : "
L7 ) M "?N
% <<< ! 6
! 6
3 6 2 J J<<<J- J J
B J J<<<J ! 6 J
J J<<<J ! 6 J ' 6
LJ7 ) N
: 1 9
7 :
$%9 * "
( < * 6E
+*' !
[ D 6 6 6 *
[ D 6 6 6 *
2% " *
"
L7 ) M "?N
% <<< ! 6
! 6
3 6 2 J J<<<J- J J
B J J<<<J ! 6 J
J J<<<J ! 6 J ' 6
LJ7 ) N
8%& * D ! !
*
[ % 6 6 6 * 6 6 6 6 *
6
1,5 $ O H # 6 6-
[
$ , F 7) 8 $ *)
' ! (
# apt-get install openssl
B 2 ) J I
45" " ?
' M #
• #'
• @ #3 < ,, D B
T B
B B
B B K
• @ 5 048# 3 "
• @ B, 5 <7:# , +C8?
• @, 5 #(
• @ #( )
+% ! ,, +
*
* 9 1 S
! #
/ 9 #
*etc/apache2/mods-available . / 0 / !
! "
/etc/apache2/mods-enable 1 0 2 3/
/ * * ' 4* 5 ! 3 "
# a2enmod
! ,,
2%H " !
# ls -l /etc/apache2/mods-enable
8* " ) #
# vi /etc/apache2/ports.conf
Listen 443
;* 9 H #
NameVirtualHost [seu-nome].xxx.br
<VirtualHost www.[seu-nome].xxx.br >
DocumentRoot /var/www/sobrenome
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/cert.ssl
SSLCertificateKeyFile /etc/apache2/ssl/cert.key
ServerName www.[seu-nome].xxx.br
ServerAdmin webmaster@sobrenome.xxx.br
ErrorLog /var/log/apache2/sobrenome.xxx.br-error.log
TransferLog /var/log/apache2/sobrenome.xx.br-access.log
common
</VirtualHost>
=* 7 +#
# /etc/init.d/apache2 restart
B I J2 )
, 3 # ' , ,7 , 0 , 0 P 6 6
- R1 5 ? 0 5 ? )S
,5 H # / - -
+,2 6 6-
% 7
H " " )
Servidores Debian:
# ps aux | grep apache2
Servidores RedHat/CentOs
# ps aux | grep httpd
' " B
O , 9/, 1 (&
9/,
F< (&G
9 #
# apt-get install bind9
B 2 ) J I
Q:
+* 9 * " #
/ 9
/etc/bind/named.conf
/ 7 :
/etc/named.conf
# vi /etc/bind/named.conf
include “primary/[seu-nome].conf”;
#
include “/etc/bind/named.conf.options”;
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "/var/cache/bind/primary/[seu-nome].conf";
};
# mkdir /var/cache/bind/primary
# mkdir /var/cache/bind/zone
! " #
/etc/bind/
named.conf
/var/cache/bind
primary/
[seu-nome].conf
zone/
db.[seu-nome]
rev.[seu-nome]
<L,# < 1 " L(/9
" f
9 ! 6 6 " )
" 1 #
No Debian:
db.root *V ) (& 7 9
/ 7 :
named.ca-> )
8*/ " 6 6 ) * "
" " ) 9/, 1 6 6 6 6 K6
c * d * * #
) "
zone "[seu-nome].xxx.br" {
type master;
file "zone/db.[seu-nome]";
};
zone "0.168.192.in-addr.arpa" {
type master;
file "zone/rev.[seu-nome]";
};
1997022700 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ); default_ttl
IN NS ns.[seu-nome].xxx.br.
IN MX 10 mail.[seu-nome].xxx.br.
[seu-nome].xxx.br. IN A 192.168.0.100
ns IN A 192.168.0.100
pop IN A 192.168.0.100
smtp IN A 192.168.0.100
mail IN A 192.168.0.100
www IN CNAME [seu-nome].xxx.br.
ftp IN CNAME [seu-nome].xxx.br.
=% * ) 7 0
6 6 6 6 K6c * d * "
6 6 6 6) 6 c * d
2005060705 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ) ; default_ttl
IN NS ns.[seu-nome].xxx.br.
100 IN PTR ns.[seu-nome].xxx.br.
100 IN PTR [seu-nome].xxx.br.
100 IN PTR mail.[seu-nome].xxx.br.
# vi /etc/resolv.conf
search [seu-nome].xxx.br
nameserver 192.168.0.100
?%I * 9/,
# /etc/init.d/bind9 stop
# /etc/init.d/bind9 start
A * & 1
# tail -f /var/log/syslog
$C - H " L
# ps aux | more
$$ * H " "
$+ * ' 9/, .
# vi /etc/resolv.conf
$2 * #
# ping -R ns.[seu-nome].xxx.br
# ping www.[seu-nome].xxx.br
# ping mail.[seu-nome].xxx.br
# ping pop.[seu-nome].xxx.br
# ping ftp.[seu-nome].xxx.br
$8 - ' : #
=+%' , 9/, ,
$ * & 9/, " 6 6
#
# vi /etc/bind/named.conf
include “secundary/primario_colega.sec”;
+ * 9 ! " ! "
" ) "
# mkdir /var/cache/bind/secundary
# mkdir /var/cache/bind/zonesec
# chown bind.bind /var/cache/bind/zonesec
! " #
/etc/bind/
named.conf
/var/cache/bind
primary/
[seu-nome].conf
secundary/
primario_colega.sec
zone/
db.[seu-nome]
rev.[seu-nome]
zonesec/
dbsec.primario_colega
H #
include “/etc/bind/named.conf.options”;
};
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "primary/[seu-nome].conf";
include "secundary/primario_colega.sec";
2%9 " , ,
* ! 6 6 6
# vi /var/cache/bind/secundary/primario_colega.sec
zone "primario_colega.xxx.br" {
type slave;
file "zonesec/dbsec.primario_colega";
masters { 192.168.0.171; };
};
options {
directory "/var/cache/bind";
allow-transfer { 192.168.0.171; };
};
4 P B* Q "
) , & " 6 6 6 6 K6c *
d #
zone "[seu-nome].xxx.br" {
type master;
file "zone/db.[seu-nome]";
allow-transfer { 192.168.0.171; };
also-notify { 192.168.0.171; };
};
zone "0.168.192.in-addr.arpa" {
type master;
file "zone/rev.[seu-nome]";
};
<L,# & * 9/, & ,
) P * KQ " " "
0 ,
O 1 P Q
)
< 1 P Q P *
Q 9/, "
' P Q #
options {
directory "/var/cache/bind";
allow-transfer { 192.168.0.171; };
version “Saifora”;
fetch-glue no;
recursion no;
};
;%I 1 ! ,
& , ) *
# /etc/init.d/bind9 restart
=2*L ' F G
9/,
/ #
$ " L(/9 F ? A "
0 G
+ " S
" ) /I,
I #
J 9/,
srv1 IN A 192.168.0.100
srv2 IN A 192.168.0.101
'
www IN CNAME srv1.[seu-nome].xxx.br
IN CNAME srv2.[seu-nome].xxx.br
options {
multiple-cnames yes;
};
9 9/, BBB c * d
www.[seu-nome].xxx.br. 60 IN A 192.168.0.100
www.[seu-nome].xxx.br. 60 IN A 192.168.0.101
= 2 -I
< ! 1
6 " . " 0
" " )
$ B 9(7 ?$ 8CA= +6
$ 7 N ? $ $+8>C8 A$>;=+ 6 6
$ C ':7 $2 CC 82=A 6 6
$ $ ':7 $2 CC 82=A 6 6
$ + ':7 $2 CC 82=A 6 6
$ 2 I(I< C? CC =2+2
) &(9 O
, #
I9 * 7 " #
B *9 ! "
* "
* " !
* " !
3K * #
7 N* "
9(7 * 9 !
I(I< * I I <
@- A A C>
'
[ 6 6 6 K
********************************
@- # A A D
[ R9 6 6 6
'<44 /9 &(9 O, 7 I9 3]& 9 H(' ,(f 6<II /<9 / 4
********************************
0@E # A
A C>
[ * *
$ 7 N ? $ $+8>C8 A$>;=+ 6 6
$ 7 N ? $ $828$?C $88+=+; 6 6 2?=* * 6 *+ $2
$ 7 N ? $ 2C=?8 $88+=A8 6 6 2?=* * 6 *+ $2
***********************************
7@F #
> A
1 >
[ 6 K
**************************
[ *
************************
4@ A .-6(/
[ * $>;2
*****************************
9@E @ 1 1 ? #
A 1 # C @ > =@ #
>
[ *
'<44 /9 &(9 O, 7 I9 3]& 9 H(' ,(f 6<II /<9 / 4
FH " ) 8 =
* g* 8g g * =g
******************************
:@ C>
[ * #+;
*****************************
[ */ * *
$ 2
< 1
< F< / B D , G
1 ) 0 "
H " #
( % $ % 7 &
F % G ' G > ( (
'
7 ) )* [ [
> '-/!
5 [ [ [
F 0 -4 ' ! 7
*************************************************
E -
( % $ % 7 &
F % G ' G > ( (
'
7 ) )* [ [
> '-/!
7 [ [
> '-/!
[ " [ [
> '-/!
; 7 # [
> '-/!
************************************************
F(-
( % $ % 7 &
F % G ' G > ( (
'
5 [ [ [
5 [ : : [ [
5 [ " [ [
************************************************
0 , A H H .& /
( % $ 4 % &
F % G ' G > ( (
'
7 [ [
> '-/!
; 7 # [
> '-/!
5 [ : : [ [
*************************************************
7I C
8 3 %
@ 7 %
0 @
" 3
: " 3 %
;)8 A5 5
"
" %
5 " 0
8 %
0 "
8 %
<
) 3 %
3 5 3 @ %
6
***************************************
82 > -6( A
( % $@, % &
F % G ' G > ( (
' ., " "
" 7 * : ; 8 *8 @@@
>E'/?I( - :,0 0 6
" 7 8 *8 6 @@@ /'-(+> ' /.
:,0 0 6
*2
<I 1 ' 0 )
" FI G FO G
O ) 1#
05
, ):;8 *8 )) ))*
& " ! F/
6G ' &(9
" ) ! & "
& #
*( !
* "
* " )
I* "
*9 !
*L
/ " ) !
!
05 % ,
@ * )
*********************************************
0 - " , E -+F(-
>
05 % 8
8 , 7 " 75 )) 3 ? %
*********************************************
0 - # >
05 % 3 3 ? %