Mudanças entre as edições de "Projeto Integrador - 2012.1 - Equipe 2"
(→DHCP) |
(→DHCP) |
||
Linha 148: | Linha 148: | ||
} | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===POSTFIX=== | ||
+ | |||
+ | O Postfix é um agent de transferência de emails (MTA), um software livre para envio e entrega de emails. Apresenta-se como uma alternativa segura ao Sendmail, sendo rápido e fácil de administrar. | ||
+ | |||
+ | *Instalação do POSTFIX: | ||
+ | apt-get install postfix mailutils | ||
+ | |||
+ | *Arquivo de configuração: /etc/postfix/main.cf | ||
+ | <code> | ||
+ | myorigin = /etc/mailname | ||
+ | myhostname = mta.vacasmalhadas.sj.ifsc.edu.br | ||
+ | mydomain = vacasmalhadas.sj.ifsc.edu.br | ||
+ | mydestination = vacasmalhadas.sj.ifsc.edu.br, MatrizVacasMalhadas.sj.ifsc.edu.br, localhost.sj.ifsc.edu.br, localhost | ||
+ | relayhost = | ||
+ | mynetworks = 127.0.0.0/8 192.168.1.0/24 | ||
+ | mailbox_size_limit = 10240000 | ||
+ | recipient_delimiter = + | ||
+ | inet_interfaces = all | ||
+ | default_transport = smtp | ||
+ | relay_transport = smtp | ||
+ | inet_protocols = ipv4 | ||
+ | alias_database = hash:/etc/aliases | ||
+ | alias_maps = hash:/etc/aliases | ||
+ | |||
+ | home_mailbox = Maildir/ | ||
+ | message_size_limit = 10240000 | ||
+ | body_checks = regexp:/etc/postfix/block_words | ||
+ | mailbox_command = | ||
+ | smtpd_sasl_local_domain = | ||
+ | smtpd_sasl_auth_enable = yes | ||
+ | smtpd_sasl_security_options = noanonymous | ||
+ | broken_sasl_auth_clients = yes | ||
+ | smtpd_recipient_restrictions = permit_sasl_authenticated,oopermit_mynetworks,reject_unauth_destination | ||
+ | |||
+ | smtp_tls_security_level = may | ||
+ | smtpd_tls_security_level = may | ||
+ | smtpd_tls_auth_only = no | ||
+ | smtp_tls_note_starttls_offer = yes | ||
+ | smtpd_tls_key_file = /etc/ss1/private/smtpd.key | ||
+ | smtpd_tls_cert_file = /etc/ss1/certs/smtpd.crt | ||
+ | smtpd_tls_CAfile = /etc/ss1/certs/cacert.pem | ||
+ | smtpd_tls_loglevel = 1 | ||
+ | smtpd_tls_received_header = yes | ||
+ | smtpd_tls_session_cache_timeout = 3600s | ||
+ | tls_random_source = dev:/dev/urandom | ||
</syntaxhighlight> | </syntaxhighlight> |
Edição das 20h33min de 26 de junho de 2012
Equipe 2
Descrição das atividades
15/06/2012
- Instalado nos servidores S.O. Ubunto server 10.14.
- Planejamento da estrutura física.
18/06/2012
- Configuração da interface eth0: Matriz
- The loopback network interface
auto lo eth0
iface lo inet loopback
- The primary network interface
iface eth0 inet static
address 192.168.1.235
gateway 192.168.1.1
netmask 255.255.255.0
</syntaxhighlight>
- Configuração da interface eth0: Filial
- The loopback network interface
auto lo eth0
iface lo inet loopback
- The primary network interface
iface eth0 inet static
address 192.168.1.236
gateway 192.168.1.1
netmask 255.255.255.0
</syntaxhighlight>
19/06/2012
- Iniciando instalação dos serviços.
SSH
O Secure Shell ou SSH é, simultaneamente, um programa de computador e um protocolo de rede que permite a conexão com outro computador na rede, de forma a executar comandos de uma unidade remota. Possui as mesmas funcionalidades do Telnet, com a vantagem da conexão entre o cliente e o servidor ser criptografada.
- Instalação do SSH:
apt-get install openssh-server
</syntaxhighlight>
DNS
O DNS (Domain Name System - Sistema de Nomes de Domínios) é um sistema de gerenciamento de nomes hierárquico e distribuído operando segundo duas definições: examinar e atualizar seu banco de dados e
resolver nomes de domínios em endereços de rede (IPs). Permite a localização de hosts em um domínio determinado. Num sistema livre o serviço é implementado pelo software BIND.
- Instalação do DNS:
apt-get install bind9 bind9utils
</syntaxhighlight>
- Arquivos de configuração:
- Arquivo: /etc/bind/named.conf.default-zones
zone "vacasmalhadas.sj.ifsc.edu.br"{
type master;
file "/etc/bind/db.vacasmalhadas";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.vacas";
};
</syntaxhighlight>
- Arquivo: /etc/bind/db.vacas
- BIND data file for local loopback interface
$TTL 604800
@ IN SOA vacasmalhadas.sj.ifsc.edu.br. root.vacasmalhadas.sj.ifsc.edu.br. (
20120620 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN A 127.0.0.1
mail IN A 127.0.0.1
IN A 127.0.0.1
IN NS ns.vacasmalhadas.sj.ifsc.edu.br.
235 IN PTR vm.vacasmalhadas.sj.ifsc.edu.br.
235 IN PTR ns.vacasmalhadas.sj.ifsc.edu.br.
235 IN PTR mta.vacasmalhadas.sj.ifsc.edu.br.
235 IN PTR www.vacasmalhadas.sj.ifsc.edu.br.
235 IN PTR samba.vacasmalhadas.sj.ifsc.edu.br.
</syntaxhighlight>
- Arquivo: /etc/bind/db.vacasmalhadas
- BIND data file for local loopback interface
$TTL 604800
@ IN SOA @ root.vacasmalhadas.sj.ifsc.edu.br. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
NS ns.vacasmalhadas.sj.ifsc.edu.br.
MX 10 mta.vacasmalhadas.sj.ifsc.edu.br.
IN A 192.168.1.235
IN NS @
IN A 127.0.0.1
vm IN A 192.168.1.235
ns IN A 192.168.1.235
mta IN A 192.168.1.235
samba IN A 192.168.1.235
www IN A 192.168.1.235
web IN CNAME www
</syntaxhighlight>
20/06/2012
DHCP
O DHCP ("Dynamic Host Configuration Protocol" ou "protocolo de configuração dinâmica de endereços de rede"), é um protocolo de serviço TCP/IP que oferece configuração dinâmica de terminais, com concessão de endereços IP de host e outros parâmetros de configuração para clientes de rede, ou seja, permite que todos os micros da rede recebam suas configurações de rede automaticamente a partir de um servidor central, sem que você precise ficar configurando os endereços manualmente em cada um.
Arquivo de configuração: /etc/dhcp3/dhcpd.conf
shared-network LOCAL-NET {
option domain-name "vacasmalhadas.sj.ifsc.edu.br";
option domain-name-servers 192.168.1.235, 8.8.8.8;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
range 192.168.1.230 192.168.1.250;
}
group {
host printer {
hardware ethernet 00:1a:4d:97:57:4a;
fixed-address 192.168.1.237;
}
}
}
</syntaxhighlight>
POSTFIX
O Postfix é um agent de transferência de emails (MTA), um software livre para envio e entrega de emails. Apresenta-se como uma alternativa segura ao Sendmail, sendo rápido e fácil de administrar.
- Instalação do POSTFIX:
apt-get install postfix mailutils
- Arquivo de configuração: /etc/postfix/main.cf
myorigin = /etc/mailname
myhostname = mta.vacasmalhadas.sj.ifsc.edu.br
mydomain = vacasmalhadas.sj.ifsc.edu.br
mydestination = vacasmalhadas.sj.ifsc.edu.br, MatrizVacasMalhadas.sj.ifsc.edu.br, localhost.sj.ifsc.edu.br, localhost
relayhost =
mynetworks = 127.0.0.0/8 192.168.1.0/24
mailbox_size_limit = 10240000
recipient_delimiter = +
inet_interfaces = all
default_transport = smtp
relay_transport = smtp
inet_protocols = ipv4
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
home_mailbox = Maildir/
message_size_limit = 10240000
body_checks = regexp:/etc/postfix/block_words
mailbox_command =
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,oopermit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ss1/private/smtpd.key
smtpd_tls_cert_file = /etc/ss1/certs/smtpd.crt
smtpd_tls_CAfile = /etc/ss1/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
</syntaxhighlight>