Mudanças entre as edições de "Projeto Integrador - 2014.2 - Caveira.Tar"
(198 revisões intermediárias por 3 usuários não estão sendo mostradas) | |||
Linha 1: | Linha 1: | ||
+ | [[Imagem:caveira_e_computador.jpg|thumb|600px]] | ||
+ | <h5>Objetivos:</h5> | ||
+ | O projeto tem o objetivo de implementar um serviço de telecomunicações(Internet, telefonia e serviço de segurança), incluindo os hardwares e softwares necessários para o funcionamento, em um edifício com 3 apartamentos. A internet deve ser acessada conforme o plano de uso residencial escolhido pelo usuário de cada apartamento. | ||
+ | |||
+ | |||
+ | |||
<h3>Diário de bordo:</h3><br> | <h3>Diário de bordo:</h3><br> | ||
− | |||
<h2>Dia:17/11/2014</h2> | <h2>Dia:17/11/2014</h2> | ||
<h5>- Escolha do nome do grupo.</h5> | <h5>- Escolha do nome do grupo.</h5> | ||
Linha 9: | Linha 14: | ||
HD:<br> | HD:<br> | ||
Placa de rede:<br> | Placa de rede:<br> | ||
+ | <h2>Dia:18/11/2014</h2> | ||
+ | <h5>- Formatação do servidor de rede | ||
+ | - Configurações básicas de rede (Configuração da interface de rede, rotas estáticas e NAT, DNS) | ||
+ | <h2>Dia:19/11/2014</h2> | ||
+ | - Ás 18:40 = Ao ligar nosso servidor descobrimos que nosso HD estava com problemas. Teremos de refazer os itens do dia 18/11/2014. | ||
+ | - Ás 19:45 = Após formatar novamente o equipamento, efetuar as configurações necessárias de rede, a equipe fez a instalação do ssh nas máquinas virtuais para que cada aluno possa efetuar as devidas instalações e configurações necessárias do servidor solicitados pelo professor de GAR (José), que são as seguintes: DNS, EMAIL, WEBMAIL, WEB, SSH, DHCP, FIREWALL. | ||
+ | - Ás 20:20 = Configurados os serviços APACHE, DNS, SSH, | ||
+ | - Ás 21:46 = Terminamos a configuração do servidor de e-mail (Postfix, Courier-pop-ssl, sasl2-bin, Dovecot e squirrelmail) | ||
+ | - Ás 22:00 = Completamos a instalação do WEBMAIL! | ||
+ | <h2>Dia:20/11/2014</h2> | ||
+ | - Ás 18:45 = Estamos trabalhando na configuração DNS, falha na resolução do nome do site e e-mail do grupo (caveiratar). | ||
+ | - Ás 21:00 = Não concluída falha no DNs. | ||
+ | |||
+ | - Ás 21:29 = Iniciamos as instalações para construção da página de cadastro dos usuários da internet em nosso prédio (Mysql, php5, Bluefish) | ||
+ | <h2>Dia 21/11/2014</h2> | ||
+ | - Ás 18:45 = Iniciamos as atividades referentes a parte de cabeamento, efetuamos a montagem do rack (bandeja, switch, organizador), efetuamos a passagem dos cabos que ligam as tomadas dos usuários dos serviços do provedor ao moden, colocamos a câmera de vigilância conforme solicitado no projeto. | ||
+ | <h2>Dia 24/11/2014</h2> | ||
+ | - Ás 18:50 = Iniciamos a criação do nosso banco de dados, utilizando mysql. Criamos nosso arquivo em PHP, porém tivemos dificuldades na visualização do mesmo. | ||
+ | <h2>Dia 25/11/2014</h2> | ||
+ | - Ás 18:35 = Iniciamos as atividades referentes a firewall e continuamos trabalhando na parte de programação (Php). - Ás 21:45 = Firewall concluído! | ||
+ | Em homenagem ao nosso professor Fábio: | ||
+ | Como diz aquele provérbio chinês das periferias brasileiras: "Enquanto Deus não voltar, deixa que a gente resolve" | ||
+ | |||
+ | <h2>Dia 26/11/2014</h2> | ||
+ | -Ás 18:30, iniciamos a inserção de regras na tabela NAT, com os IPs externos disponibilizados para as equipes, o que nos deu muito trabalho. Começamos a trabalhar em um script no init para que o NAT seja inicializado com o servidor caveira. Os testes no final da aula não foram executados com sucesso. | ||
+ | <h2>Dia 27/11/2014</h2> | ||
+ | - Finalizadas as atividades referentes ao NAT. Efetuadas configurações referentes a Iptables e elaborado um script em bash para iniciar o Iptables sempre que inicializar o servidor caveira. Finalizado também nosso script em bash para cadastro dos usuários do condomínio. | ||
+ | <h2>Dia 28/11/2014</h2> | ||
+ | - Atividades referentes ao cabeamento estruturado, efetuamos a conexão dos cabos provenientes das tomadas no patch panel, estamos utilizando o padrão de cores "A". Efetuamos também a fusão de fibra ótica, para conexão dos distribuidores ópticos, o teste efetuado pelo professor Saul foi positivo, nossas fusões foram efetuadas com sucesso! | ||
+ | <h2>Dia 01/12/2014</h2> | ||
+ | -DNS concluído com sucesso. | ||
+ | -DHCP concluído com sucesso. | ||
+ | <h2>Dia 02/12/2014</h2> | ||
+ | -Ás 19:50 = Efetuamos pesquisas referente a um bom sistema de monitoramento de tráfego de rede, e trabalhamos um pouco na parte de programação. | ||
+ | -Ás 21:00 = Trabalhamos na parte de cabeamento, efetuamos a ligação do tronco e 4 linhas telefônicas em nosso patch panel e efetuamos testes de conectividade das tomadas, tomada1 foi refeita pois apresentou problemas, porém continuou apresentando falha. | ||
+ | <h2>Dia 03/12/14</h2> - Não houve atividade da equipe caveira. | ||
+ | <h2>Dia 04/12/14</h2> - Efetuadas as configurações do switch catalyst, e trabalhando na configuração das vlans. | ||
+ | <h2>Dia 05/12/14</h2> - Continuamos as atividades referentes a configuração das vlans, sem sucesso. | ||
+ | <h2>Dia 08/12/14</h2> - Ainda trabalhando na configuração das vlans e instalado freeradius. | ||
+ | <h2>DIa 09/12/14</h2> - Ainda trabalhando com vlan.Estamos com problemas no DHCP. Infelizmente nossas tarefas referentes ao cabeamento estruturado foram finalizadas, pois nossas conexões foram retiradas indevidamente por outra turma que realizava o projeto integrador. | ||
+ | <h2>Dia 10/12/14</h2> - Descobrimos que a placa de rede do servidor estava com defeito, foi susbstituída. Concluída nossa página de cadastro de clientes. | ||
+ | <h2>Dia 11/12/14</h2> - Não conseguimos concluir a configuração do switch. | ||
+ | |||
+ | <h3>Tarefas a serem executadas:</h3><br> | ||
+ | {| style="background:#CCFFFF" border="2" cellpadding="2" | ||
+ | |- | ||
+ | ! Atividade | ||
+ | ! Tarefa | ||
+ | ! Tempo | ||
+ | ! Prazo | ||
+ | ! Conclusão | ||
+ | |- | ||
+ | | 1 | ||
+ | | Instalação do sistema operacional no servidor | ||
+ | | 2h | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 2 | ||
+ | | Instalação dos serviços básicos de rede | ||
+ | | 1h | ||
+ | | 25/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 3 | ||
+ | | Configurações básicas de rede | ||
+ | | 3h | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 4 | ||
+ | | Configurar DNS | ||
+ | | 3h | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 5 | ||
+ | | Configurar APACHE | ||
+ | | 1h | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 6 | ||
+ | | Instalação SSH e testes SSH | ||
+ | | 25min | ||
+ | | 20/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 7 | ||
+ | | Configuração do servidor de e-mail | ||
+ | | 3h | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 8 | ||
+ | | Instalação do Webmail | ||
+ | | 30min | ||
+ | | 21/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 9 | ||
+ | | Configuração e instalação DHCP | ||
+ | | 2h | ||
+ | | 27/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 10 | ||
+ | | Firewall | ||
+ | | 3h | ||
+ | | 28/11/2014 | ||
+ | | ok | ||
+ | |- | ||
+ | | 11 | ||
+ | | Atividades referentes ao serviço de provedor(Mysql, Php, Freeradius) | ||
+ | | 4h | ||
+ | |30/11/2014 | ||
+ | |- | ||
+ | | 12 | ||
+ | | Atividades referentes ao cabeamento estruturado | ||
+ | | 12h | ||
+ | | 12/12/2014 | ||
+ | |- | ||
+ | | 13 | ||
+ | | Alterações para faixa de IPs disponibilizados para a equipe dos serviços:bind9, apache2, squirrell mail | ||
+ | | 4h | ||
+ | | 10/12/2014 | ||
+ | |} | ||
+ | |||
+ | |||
+ | <h3>Gerência de redes</h3> | ||
+ | |||
+ | Servidor DNS (Bind9), com a configuração básica a ser aplicada a cada cliente; | ||
+ | Servidor de Email, em que um usuário deve poder enviar e receber emails acessando sua conta no servidor. Para testes crie alguns usuários (envio de email entre usuários e para outra conta externa); | ||
+ | Servidor Webmail, para possibilitar o envio de emails para troca de informações pela Web; | ||
+ | Servidor Web (Apache); | ||
+ | Servidor SSH, para possibilitar a realização de uma conexão segura remotamente; | ||
+ | Servidor DHCP, com provimento de uma faixa de endereços para a rede cabeada e outra faixa para a rede sem-fio; | ||
+ | Controle de acesso por Firewall (com iptables), por uma configuração básica para proteger a rede contra ataques externos, limitar o tráfego, entre outros. | ||
+ | |||
+ | *Programas instalados | ||
+ | <syntaxhighlight lang=bash> | ||
+ | apt-get install bind9 | ||
+ | apt-get install ssh | ||
+ | apt-get install apache2 | ||
+ | apt-get install dhcp3-server | ||
+ | apt-get install iptables | ||
+ | apt-get install isc-dhcp-server | ||
+ | apt-get install postfix | ||
+ | apt-get install mailutils | ||
+ | apt-get install squirrelmail | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | *Configurando o arquivo: vi /etc/bind/named.conf.local | ||
+ | <code> | ||
+ | // | ||
+ | // Do any local configuration here | ||
+ | // | ||
+ | |||
+ | // Consider adding the 1918 zones here, if they are not used in your | ||
+ | // organization | ||
+ | //include "/etc/bind/zones.rfc1918"; | ||
+ | |||
+ | zone "caveiratar.sj.ifsc.edu.br" { | ||
+ | type master; | ||
+ | file "/etc/bind/db.caveira"; | ||
+ | }; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | *Configurando o arquivo vi /etc/network/interfaces | ||
+ | <code> | ||
+ | # This file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, see interfaces(5). | ||
+ | |||
+ | # The loopback network interface | ||
+ | #auto lo eth0 eth1 | ||
+ | auto eth0 eth0:1 eth1 | ||
+ | iface lo inet loopback | ||
+ | address 127.0.0.1 | ||
+ | netmask 255.0.0.0 | ||
+ | |||
+ | iface eth0 inet static | ||
+ | address 200.135.37.123 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth0:1 inet static | ||
+ | address 200.135.37.124 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth1 inet static | ||
+ | address 192.168.100.1 | ||
+ | netmask 255.255.255.0 | ||
+ | pre-up iptables-restore < /etc/iptables.rules | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | *Configurando o arquivo vi /etc/postfix/main.cf | ||
+ | <code> | ||
+ | |||
+ | # See /usr/share/postfix/main.cf.dist for a commented, more complete version | ||
+ | |||
+ | |||
+ | # Debian specific: Specifying a file name will cause the first | ||
+ | # line of that file to be used as the name. The Debian default | ||
+ | # is /etc/mailname. | ||
+ | #myorigin = /etc/mailname | ||
+ | |||
+ | #smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | ||
+ | #biff = no | ||
+ | |||
+ | # appending .domain is the MUA's job. | ||
+ | #append_dot_mydomain = no | ||
+ | |||
+ | # Uncomment the next line to generate "delayed mail" warnings | ||
+ | #delay_warning_time = 4h | ||
+ | |||
+ | #readme_directory = no | ||
+ | |||
+ | # TLS parameters | ||
+ | #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem | ||
+ | #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key | ||
+ | #smtpd_use_tls=yes | ||
+ | #smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache | ||
+ | #smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache | ||
+ | |||
+ | # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for | ||
+ | # information on enabling SSL in the smtp client. | ||
+ | |||
+ | #smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination | ||
+ | mydomain = caveiratar.sj.ifsc.edu.br | ||
+ | myhostname = aluno.caveira.sj.ifsc.edu.br | ||
+ | myorigin = caveiratar.sj.ifsc.edu.br | ||
+ | #alias_maps = hash:/etc/aliases | ||
+ | #alias_database = hash:/etc/aliases | ||
+ | mydestination = aluno, caveiratar.sj.ifsc.edu.br | ||
+ | #relayhost = | ||
+ | mynetworks = 192.168.1.105,127.0.0.0/8 | ||
+ | #mailbox_size_limit = 0 | ||
+ | #recipient_delimiter = + | ||
+ | #inet_interfaces = all | ||
+ | home_mailbox = Maildir/ | ||
+ | |||
+ | smtpd_sasl_auth_enable = yes | ||
+ | broken_sasl_auth_clients = yes | ||
+ | smtpd_sasl_authenticated_header = yes | ||
+ | smtpd_helo_required = yes | ||
+ | smtpd_recipient_restrictions = | ||
+ | permit_mynetworks, | ||
+ | permit_sasl_authenticated, | ||
+ | reject_unauth_destination | ||
+ | inet_protocols = ipv4 | ||
+ | ~ | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | *Configurando o arquivo /etc/iptables.rules | ||
+ | <code> | ||
+ | |||
+ | # Generated by iptables-save v1.4.21 on Wed Nov 26 22:19:04 2014 | ||
+ | *nat | ||
+ | :PREROUTING ACCEPT [59:4300] | ||
+ | :INPUT ACCEPT [6:424] | ||
+ | :OUTPUT ACCEPT [6:443] | ||
+ | :POSTROUTING ACCEPT [6:443] | ||
+ | -A POSTROUTING -s 192.168.100.1/24 -o eth0 -j MASQUERADE | ||
+ | COMMIT | ||
+ | # Completed on Wed Nov 26 22:19:04 2014 | ||
+ | ~ | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | *Configurando o arquivo /etc/bind/db.caveira | ||
+ | <code> | ||
+ | |||
+ | ; | ||
+ | ; BIND data file for local loopback interface | ||
+ | ; | ||
+ | $TTL 604800 | ||
+ | @ IN SOA localhost. root.localhost. ( | ||
+ | 14 ; Serial | ||
+ | 604800 ; Refresh | ||
+ | 86400 ; Retry | ||
+ | 2419200 ; Expire | ||
+ | 604800 ) ; Negative Cache TTL | ||
+ | ; | ||
+ | @ IN NS ns.caveiratar.sj.ifsc.edu.br. | ||
+ | @ IN A 200.135.37.123 | ||
+ | @ IN MX 10 webmail.caveiratar.sj.ifsc.edu.br. | ||
+ | ns IN A 200.135.37.123 | ||
+ | www IN CNAME ns | ||
+ | webmail IN A 200.135.37.124 | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | *Configurando o arquivo /etc/dhcp/dhcpd.conf | ||
+ | |||
+ | <code> | ||
+ | default-lease-time 600; | ||
+ | max-lease-time 7200; | ||
+ | option subnet-mask 255.255.255.192; | ||
+ | option broadcast-address 200.135.37.126; | ||
+ | option routers 192.168.1.5; | ||
+ | option domain-name-servers 192.168.1.5; | ||
+ | option domain-name "caveiratar.sj.ifsc.edu.br"; | ||
+ | |||
+ | subnet 200.135.65.0 netmask 255.255.255.192 { | ||
+ | range 200.135.37.70 200.135.37.90; | ||
+ | } | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | *Configurando o arquivo /etc/resolv.conf | ||
+ | |||
+ | <code> | ||
+ | # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) | ||
+ | # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN | ||
+ | |||
+ | nameserver 200.137.35.123 | ||
+ | nameserver 200.137.35.124 | ||
+ | nameserver 192.168.100.1 | ||
+ | nameserver 8.8.8.8 | ||
+ | ~ | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <h3>Programação para redes de computadores</h3> | ||
+ | |||
+ | Produto a entregar:Desenvolver um aplicativo Web para apoio no gerenciamento de usuários de Serviços de Telecomunicações, disponibilizados em um condomínio residencial, possuindo as opções de cadastro, listagem, pesquisa, alteração e exclusão de usuários. Assumir como chave primária o CPF do usuário. | ||
+ | O formulário de cadastro deverá conter os seguintes campos: | ||
+ | Nome do usuário; | ||
+ | CPF; | ||
+ | Tipo de Plano (1- Popular: até 512Kbps de taxa de transmissão e 1GB de espaço em disco; 2- Comum: até 2Mbps e 10GB; 3- VIP: até 10Mbps e 100GB); | ||
+ | Data de adesão; | ||
+ | Bloco/Edifício; | ||
+ | Apartamento; | ||
+ | Telefone; | ||
+ | E-mail; | ||
+ | |||
+ | |||
+ | *Programas instalados | ||
+ | |||
+ | <syntaxhighlight lang=bash> | ||
+ | |||
+ | apt-get install mysql-server | ||
+ | apt-get install mysql-client | ||
+ | apt-get install mysql-php5 | ||
+ | apt-get install bluefish | ||
+ | apt-get install freeradius | ||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | *Esqueleto Banco de dados Mysql | ||
+ | {| border=2 | ||
+ | |- | ||
+ | ! DATABASE PROVEDOR | ||
+ | |- | ||
+ | | Cliente | ||
+ | | Plano | ||
+ | |- | ||
+ | | Nome | ||
+ | | Idplano | ||
+ | |- | ||
+ | | Cpf | ||
+ | | Nome | ||
+ | |- | ||
+ | | Bloco | ||
+ | | Valor | ||
+ | |- | ||
+ | | Idplano | ||
+ | | Disco | ||
+ | |- | ||
+ | | Data de Adesão | ||
+ | | Velocidade | ||
+ | |- | ||
+ | | Telefone | ||
+ | | * | ||
+ | |- | ||
+ | | E-mail | ||
+ | | * | ||
+ | |- | ||
+ | | Senha | ||
+ | | * | ||
+ | |- | ||
+ | | Apto | ||
+ | | * | ||
+ | |} | ||
+ | ''*Banco de dados mysql - informações do cliente:'' | ||
+ | [[Imagem:mysqll.jpg|thumb|center|600px]] | ||
+ | ''*Criar database provedor'' | ||
+ | <code> | ||
+ | create database provedor; | ||
+ | </syntaxhighlight> | ||
+ | ''*Acessando mysql'' | ||
+ | <code> | ||
+ | mysql -u root -p | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | <h3>Cabeamento estruturado</h3> | ||
+ | |||
+ | Produtos a entregar: | ||
+ | Cabeamento dos enlaces ADSL e SHDL, centrais telefônicas e sistema de vigilância. | ||
+ | Cabeamento entre os servidores e 3 apartamentos, esses cabeamentos devem suportar o uso simultâneo de rede de dados, vigilância e telefone. | ||
+ | Todo o cabeamento deve ser testado, identificado e organizado. | ||
+ | Esquemático indicando todas as ligações, referenciando as identificações realizadas. ( entrega na Wiki). | ||
+ | |||
+ | *Topologia física cabeamento estruturado: | ||
+ | [[Imagem:CABEAMENTO.jpg|thumb|center|600px]] | ||
+ | |||
+ | Equipe caveiratar feliz com as fusões de fibra ótica: | ||
+ | [[Imagem:equipe.jpg|thumb|center|300px]] | ||
+ | |||
+ | |||
+ | *Dia 21/11 - Instalando câmera de vigilância: | ||
+ | [[Imagem:camera.jpg|thumb|center|300px]] | ||
+ | *Dia 28/11 - Distribuidor óptico 1: | ||
+ | [[Imagem:distribuidor1.jpg|thumb|center|300px]] | ||
+ | [[Imagem:distribuidor.jpg|thumb|center|300px]] | ||
+ | *Dia 28/11 - Distribuidor óptico 2: | ||
+ | [[Imagem:distrbuidor2.jpg|thumb|center|300px]] | ||
+ | |||
+ | |||
+ | |||
+ | <h3>Instalação de equipamentos de rede</h3> | ||
+ | |||
+ | |||
+ | Produto a entregar: | ||
+ | Modem SHDL | ||
+ | Modem ADSL | ||
+ | Switch Cisco Catalyst 2960-S (já com as VLANs) | ||
+ | Access Point para acesso pelos condôminos | ||
+ | |||
+ | |||
+ | *Configuração do Switch Catalyst 2960-S | ||
+ | [[Imagem:nelson.jpg|thumb|center|300px]] | ||
+ | [[Imagem:nelson2.jpg|thumb|center|300px]] | ||
+ | |||
+ | *Segurar o botão por alguns segundos efetuando o reset do switch. | ||
+ | *Utilizar o cabo adaptador RJ45 no switch e serial no computador. | ||
+ | *Abrir o terminal | ||
+ | <code> | ||
+ | sudo minicom -s | ||
+ | </syntaxhighlight> | ||
+ | [[Imagem:telai.jpg|thumb|center|300px]] | ||
+ | ''*Configurando minicom:'' | ||
+ | Selecione a opção: "Configuração da porta serial" | ||
+ | |||
+ | ┌─────────────[configuração]──────────────┐ | ||
+ | │ Nomes de arquivos e rotas | ||
+ | │ Protocolos de transferência de arquivos | ||
+ | │ Configuração da porta serial | ||
+ | │ Modem e discagem | ||
+ | │ Tela e teclado | ||
+ | │ Salvar configuração como dfl | ||
+ | │ Salvar configuração como | ||
+ | │ Sair | ||
+ | │ Sair do Minicom | ||
+ | └────────────────────────────────────────┘ | ||
+ | |||
+ | Em seguida: | ||
+ | |||
+ | ┌──────────────────────────────────────────────────────────┐ | ||
+ | │ A – Dispositivo Serial : /dev/tty1 | ||
+ | │ B – Localização do Arquivo de Travamento : /var/lock | ||
+ | │ C – Programa de Entrada : | ||
+ | │ D – Programa de Saída : | ||
+ | │ E – Bps/Paridade/Bits : 38400 8N1 | ||
+ | │ F – Controle de Fluxo por Hardware : Sim | ||
+ | │ G – Controle de Fluxo por Software : Não | ||
+ | │ | ||
+ | │ Alterar qual configuração? | ||
+ | └──────────────────────────────────────────────────────────┘ | ||
+ | ''*Alterando as opções:'' | ||
+ | <code> | ||
+ | |||
+ | Dispositivo Serial : /dev/ttSy0 | ||
+ | Bps/Paridade/Bits : 9600 8N1 | ||
+ | Controle de Fluxo por Hardware : Não | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | <code> | ||
+ | enable; | ||
+ | </syntaxhighlight> | ||
+ | <code> | ||
+ | configure terminal | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | ''*Criar VLAN:'' | ||
+ | <code> | ||
+ | configure terminal | ||
+ | vlan 'numero' | ||
+ | name 'nome' | ||
+ | exit | ||
+ | exit | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ''*Associando portas (físicas) à VLAN:'' | ||
+ | <code> | ||
+ | configure terminal | ||
+ | interface GigabitEthernet 0/24 | ||
+ | switchport mode access | ||
+ | switchport access vlan 'numero' | ||
+ | exit | ||
+ | exit | ||
+ | </syntaxhighlight> | ||
+ | ''*Associando IP e Servidor DHCP à VLAN:'' | ||
+ | <code> | ||
+ | configure terminal | ||
+ | interface vlan 'numero' | ||
+ | ip address '''numero_ip''' '''mascara''' | ||
+ | ip helper-address 'ip_dhcp' | ||
+ | exit | ||
+ | exit | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ''*Configurando a porta onde estará conectado o Servidor DHCP:'' | ||
+ | <code> | ||
+ | |||
+ | Esta em sua essência será uma porta trunk associada à VLAN do servidor DHCP e às VLANs onde residem os clientes DHCP. | ||
+ | configure terminal | ||
+ | interface GigabitEthernet 0/24 | ||
+ | switchport trunk encapsulation dot1q | ||
+ | switchport trunk allowed vlan 'numero1','numero2' | ||
+ | switchport mode trunk | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | ''*Verificação de VLANS criadas via terminal:'' | ||
+ | <code> | ||
+ | show vlan | ||
+ | </syntaxhighlight> | ||
+ | ''*Configurando VLAN no servidor:'' | ||
+ | *Instalando: | ||
+ | <syntaxhighlight lang=bash> | ||
+ | apt-get install vlan | ||
+ | </syntaxhighlight> | ||
+ | *Arquivo /etc/network/interfaces: | ||
+ | <code> | ||
+ | #s file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, see interfaces(5). | ||
+ | |||
+ | # The loopback network interface | ||
+ | auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13 | ||
+ | iface lo inet loopback | ||
+ | address 127.0.0.1 | ||
+ | netmask 255.0.0.0 | ||
+ | |||
+ | iface eth0 inet static | ||
+ | address 200.135.37.123 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth0:1 inet static | ||
+ | address 200.135.37.124 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth1 inet static | ||
+ | address 192.168.100.1 | ||
+ | netmask 255.255.255.0 | ||
+ | |||
+ | ##########VLAN########### | ||
+ | iface eth1.10 inet static | ||
+ | address 192.168.100.254 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan11 inet static | ||
+ | address 192.168.100.253 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan12 inet static | ||
+ | address 192.168.100.252 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan13 inet static | ||
+ | This file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, see interfaces(5). | ||
+ | |||
+ | # The loopback network interface | ||
+ | auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13 | ||
+ | iface lo inet loopback | ||
+ | address 127.0.0.1 | ||
+ | netmask 255.0.0.0 | ||
+ | |||
+ | iface eth0 inet static | ||
+ | address 200.135.37.123 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth0:1 inet static | ||
+ | address 200.135.37.124 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth1 inet static | ||
+ | address 192.168.100.1 | ||
+ | netmask 255.255.255.0 | ||
+ | |||
+ | ##########VLAN########### | ||
+ | iface eth1.10 inet static | ||
+ | address 192.168.100.254 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan11 inet static | ||
+ | address 192.168.100.253 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan12 inet static | ||
+ | address 192.168.100.252 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | iface vlan13 inet static | ||
+ | This file describes the network interfaces available on your system | ||
+ | # and how to activate them. For more information, see interfaces(5). | ||
+ | |||
+ | # The loopback network interface | ||
+ | auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13 | ||
+ | iface lo inet loopback | ||
+ | address 127.0.0.1 | ||
+ | netmask 255.0.0.0 | ||
+ | |||
+ | iface eth0 inet static | ||
+ | address 200.135.37.123 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth0:1 inet static | ||
+ | address 200.135.37.124 | ||
+ | netmask 255.255.255.192 | ||
+ | gateway 200.135.37.126 | ||
+ | |||
+ | iface eth1 inet static | ||
+ | address 192.168.100.1 | ||
+ | netmask 255.255.255.0 | ||
+ | |||
+ | ##########VLAN########### | ||
+ | iface eth1.10 inet static | ||
+ | address 192.168.100.254 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan11 inet static | ||
+ | address 192.168.100.253 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | iface vlan12 inet static | ||
+ | address 192.168.100.252 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | iface vlan13 inet static | ||
+ | address 192.168.100.251 | ||
+ | netmask 255.255.255.0 | ||
+ | vlan-raw-device eth1 | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | pre-up iptables-restore < /etc/iptables.rules | ||
+ | </syntaxhighlight> |
Edição atual tal como às 17h37min de 12 de dezembro de 2014
Objetivos:
O projeto tem o objetivo de implementar um serviço de telecomunicações(Internet, telefonia e serviço de segurança), incluindo os hardwares e softwares necessários para o funcionamento, em um edifício com 3 apartamentos. A internet deve ser acessada conforme o plano de uso residencial escolhido pelo usuário de cada apartamento.
Diário de bordo:
Dia:17/11/2014
- Escolha do nome do grupo.
- Escolha PC para servidor KIT3, novo Caveira.Tar server.
Placa Mãe:
Memória:
Processador:
HD:
Placa de rede:
Dia:18/11/2014
- Formatação do servidor de rede
- Configurações básicas de rede (Configuração da interface de rede, rotas estáticas e NAT, DNS)
Dia:19/11/2014
- Ás 18:40 = Ao ligar nosso servidor descobrimos que nosso HD estava com problemas. Teremos de refazer os itens do dia 18/11/2014.
- Ás 19:45 = Após formatar novamente o equipamento, efetuar as configurações necessárias de rede, a equipe fez a instalação do ssh nas máquinas virtuais para que cada aluno possa efetuar as devidas instalações e configurações necessárias do servidor solicitados pelo professor de GAR (José), que são as seguintes: DNS, EMAIL, WEBMAIL, WEB, SSH, DHCP, FIREWALL.
- Ás 20:20 = Configurados os serviços APACHE, DNS, SSH,
- Ás 21:46 = Terminamos a configuração do servidor de e-mail (Postfix, Courier-pop-ssl, sasl2-bin, Dovecot e squirrelmail)
- Ás 22:00 = Completamos a instalação do WEBMAIL!
Dia:20/11/2014
- Ás 18:45 = Estamos trabalhando na configuração DNS, falha na resolução do nome do site e e-mail do grupo (caveiratar).
- Ás 21:00 = Não concluída falha no DNs.
- Ás 21:29 = Iniciamos as instalações para construção da página de cadastro dos usuários da internet em nosso prédio (Mysql, php5, Bluefish)
Dia 21/11/2014
- Ás 18:45 = Iniciamos as atividades referentes a parte de cabeamento, efetuamos a montagem do rack (bandeja, switch, organizador), efetuamos a passagem dos cabos que ligam as tomadas dos usuários dos serviços do provedor ao moden, colocamos a câmera de vigilância conforme solicitado no projeto.
Dia 24/11/2014
- Ás 18:50 = Iniciamos a criação do nosso banco de dados, utilizando mysql. Criamos nosso arquivo em PHP, porém tivemos dificuldades na visualização do mesmo.
Dia 25/11/2014
- Ás 18:35 = Iniciamos as atividades referentes a firewall e continuamos trabalhando na parte de programação (Php). - Ás 21:45 = Firewall concluído!
Em homenagem ao nosso professor Fábio:
Como diz aquele provérbio chinês das periferias brasileiras: "Enquanto Deus não voltar, deixa que a gente resolve"
Dia 26/11/2014
-Ás 18:30, iniciamos a inserção de regras na tabela NAT, com os IPs externos disponibilizados para as equipes, o que nos deu muito trabalho. Começamos a trabalhar em um script no init para que o NAT seja inicializado com o servidor caveira. Os testes no final da aula não foram executados com sucesso.
Dia 27/11/2014
- Finalizadas as atividades referentes ao NAT. Efetuadas configurações referentes a Iptables e elaborado um script em bash para iniciar o Iptables sempre que inicializar o servidor caveira. Finalizado também nosso script em bash para cadastro dos usuários do condomínio.
Dia 28/11/2014
- Atividades referentes ao cabeamento estruturado, efetuamos a conexão dos cabos provenientes das tomadas no patch panel, estamos utilizando o padrão de cores "A". Efetuamos também a fusão de fibra ótica, para conexão dos distribuidores ópticos, o teste efetuado pelo professor Saul foi positivo, nossas fusões foram efetuadas com sucesso!
Dia 01/12/2014
-DNS concluído com sucesso.
-DHCP concluído com sucesso.
Dia 02/12/2014
-Ás 19:50 = Efetuamos pesquisas referente a um bom sistema de monitoramento de tráfego de rede, e trabalhamos um pouco na parte de programação.
-Ás 21:00 = Trabalhamos na parte de cabeamento, efetuamos a ligação do tronco e 4 linhas telefônicas em nosso patch panel e efetuamos testes de conectividade das tomadas, tomada1 foi refeita pois apresentou problemas, porém continuou apresentando falha.
Dia 03/12/14
- Não houve atividade da equipe caveira.
Dia 04/12/14
- Efetuadas as configurações do switch catalyst, e trabalhando na configuração das vlans.
Dia 05/12/14
- Continuamos as atividades referentes a configuração das vlans, sem sucesso.
Dia 08/12/14
- Ainda trabalhando na configuração das vlans e instalado freeradius.
DIa 09/12/14
- Ainda trabalhando com vlan.Estamos com problemas no DHCP. Infelizmente nossas tarefas referentes ao cabeamento estruturado foram finalizadas, pois nossas conexões foram retiradas indevidamente por outra turma que realizava o projeto integrador.
Dia 10/12/14
- Descobrimos que a placa de rede do servidor estava com defeito, foi susbstituída. Concluída nossa página de cadastro de clientes.
Dia 11/12/14
- Não conseguimos concluir a configuração do switch.
Tarefas a serem executadas:
Atividade
Tarefa
Tempo
Prazo
Conclusão
1
Instalação do sistema operacional no servidor
2h
21/11/2014
ok
2
Instalação dos serviços básicos de rede
1h
25/11/2014
ok
3
Configurações básicas de rede
3h
21/11/2014
ok
4
Configurar DNS
3h
21/11/2014
ok
5
Configurar APACHE
1h
21/11/2014
ok
6
Instalação SSH e testes SSH
25min
20/11/2014
ok
7
Configuração do servidor de e-mail
3h
21/11/2014
ok
8
Instalação do Webmail
30min
21/11/2014
ok
9
Configuração e instalação DHCP
2h
27/11/2014
ok
10
Firewall
3h
28/11/2014
ok
11
Atividades referentes ao serviço de provedor(Mysql, Php, Freeradius)
4h
30/11/2014
12
Atividades referentes ao cabeamento estruturado
12h
12/12/2014
13
Alterações para faixa de IPs disponibilizados para a equipe dos serviços:bind9, apache2, squirrell mail
4h
10/12/2014
Gerência de redes
Servidor DNS (Bind9), com a configuração básica a ser aplicada a cada cliente;
Servidor de Email, em que um usuário deve poder enviar e receber emails acessando sua conta no servidor. Para testes crie alguns usuários (envio de email entre usuários e para outra conta externa);
Servidor Webmail, para possibilitar o envio de emails para troca de informações pela Web;
Servidor Web (Apache);
Servidor SSH, para possibilitar a realização de uma conexão segura remotamente;
Servidor DHCP, com provimento de uma faixa de endereços para a rede cabeada e outra faixa para a rede sem-fio;
Controle de acesso por Firewall (com iptables), por uma configuração básica para proteger a rede contra ataques externos, limitar o tráfego, entre outros.
- Programas instalados
apt-get install bind9
apt-get install ssh
apt-get install apache2
apt-get install dhcp3-server
apt-get install iptables
apt-get install isc-dhcp-server
apt-get install postfix
apt-get install mailutils
apt-get install squirrelmail
- Configurando o arquivo: vi /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "caveiratar.sj.ifsc.edu.br" {
type master;
file "/etc/bind/db.caveira";
};
</syntaxhighlight>
- Configurando o arquivo vi /etc/network/interfaces
- This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
- auto lo eth0 eth1
auto eth0 eth0:1 eth1
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
pre-up iptables-restore < /etc/iptables.rules
</syntaxhighlight>
- Configurando o arquivo vi /etc/postfix/main.cf
- See /usr/share/postfix/main.cf.dist for a commented, more complete version
- Debian specific: Specifying a file name will cause the first
- line of that file to be used as the name. The Debian default
- is /etc/mailname.
- myorigin = /etc/mailname
- smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
- biff = no
- appending .domain is the MUA's job.
- append_dot_mydomain = no
- Uncomment the next line to generate "delayed mail" warnings
- delay_warning_time = 4h
- readme_directory = no
- TLS parameters
- smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
- smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- smtpd_use_tls=yes
- smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
- smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
- See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
- information on enabling SSL in the smtp client.
- smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
mydomain = caveiratar.sj.ifsc.edu.br
myhostname = aluno.caveira.sj.ifsc.edu.br
myorigin = caveiratar.sj.ifsc.edu.br
- alias_maps = hash:/etc/aliases
- alias_database = hash:/etc/aliases
mydestination = aluno, caveiratar.sj.ifsc.edu.br
- relayhost =
mynetworks = 192.168.1.105,127.0.0.0/8
- mailbox_size_limit = 0
- recipient_delimiter = +
- inet_interfaces = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
inet_protocols = ipv4
~
</syntaxhighlight>
- Configurando o arquivo /etc/iptables.rules
- Generated by iptables-save v1.4.21 on Wed Nov 26 22:19:04 2014
- nat
- PREROUTING ACCEPT [59:4300]
- INPUT ACCEPT [6:424]
- OUTPUT ACCEPT [6:443]
- POSTROUTING ACCEPT [6:443]
-A POSTROUTING -s 192.168.100.1/24 -o eth0 -j MASQUERADE
COMMIT
- Completed on Wed Nov 26 22:19:04 2014
~
</syntaxhighlight>
- Configurando o arquivo /etc/bind/db.caveira
- BIND data file for local loopback interface
$TTL 604800
@ IN SOA localhost. root.localhost. (
14 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.caveiratar.sj.ifsc.edu.br.
@ IN A 200.135.37.123
@ IN MX 10 webmail.caveiratar.sj.ifsc.edu.br.
ns IN A 200.135.37.123
www IN CNAME ns
webmail IN A 200.135.37.124
</syntaxhighlight>
- Configurando o arquivo /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.192;
option broadcast-address 200.135.37.126;
option routers 192.168.1.5;
option domain-name-servers 192.168.1.5;
option domain-name "caveiratar.sj.ifsc.edu.br";
subnet 200.135.65.0 netmask 255.255.255.192 {
range 200.135.37.70 200.135.37.90;
}
</syntaxhighlight>
- Configurando o arquivo /etc/resolv.conf
- Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
- DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 200.137.35.123
nameserver 200.137.35.124
nameserver 192.168.100.1
nameserver 8.8.8.8
~
</syntaxhighlight>
Programação para redes de computadores
Produto a entregar:Desenvolver um aplicativo Web para apoio no gerenciamento de usuários de Serviços de Telecomunicações, disponibilizados em um condomínio residencial, possuindo as opções de cadastro, listagem, pesquisa, alteração e exclusão de usuários. Assumir como chave primária o CPF do usuário.
O formulário de cadastro deverá conter os seguintes campos:
Nome do usuário;
CPF;
Tipo de Plano (1- Popular: até 512Kbps de taxa de transmissão e 1GB de espaço em disco; 2- Comum: até 2Mbps e 10GB; 3- VIP: até 10Mbps e 100GB);
Data de adesão;
Bloco/Edifício;
Apartamento;
Telefone;
E-mail;
- Programas instalados
apt-get install mysql-server
apt-get install mysql-client
apt-get install mysql-php5
apt-get install bluefish
apt-get install freeradius
- Esqueleto Banco de dados Mysql
DATABASE PROVEDOR
Cliente
Plano
Nome
Idplano
Cpf
Nome
Bloco
Valor
Idplano
Disco
Data de Adesão
Velocidade
Telefone
*
E-mail
*
Senha
*
Apto
*
*Banco de dados mysql - informações do cliente:
*Criar database provedor
create database provedor;
</syntaxhighlight>
*Acessando mysql
mysql -u root -p
</syntaxhighlight>
Cabeamento estruturado
Produtos a entregar:
Cabeamento dos enlaces ADSL e SHDL, centrais telefônicas e sistema de vigilância.
Cabeamento entre os servidores e 3 apartamentos, esses cabeamentos devem suportar o uso simultâneo de rede de dados, vigilância e telefone.
Todo o cabeamento deve ser testado, identificado e organizado.
Esquemático indicando todas as ligações, referenciando as identificações realizadas. ( entrega na Wiki).
- Topologia física cabeamento estruturado:
Equipe caveiratar feliz com as fusões de fibra ótica:
- Dia 21/11 - Instalando câmera de vigilância:
- Dia 28/11 - Distribuidor óptico 1:
- Dia 28/11 - Distribuidor óptico 2:
Instalação de equipamentos de rede
Produto a entregar:
Modem SHDL
Modem ADSL
Switch Cisco Catalyst 2960-S (já com as VLANs)
Access Point para acesso pelos condôminos
- Configuração do Switch Catalyst 2960-S
- Segurar o botão por alguns segundos efetuando o reset do switch.
- Utilizar o cabo adaptador RJ45 no switch e serial no computador.
- Abrir o terminal
sudo minicom -s
</syntaxhighlight>
*Configurando minicom:
Selecione a opção: "Configuração da porta serial"
┌─────────────[configuração]──────────────┐
│ Nomes de arquivos e rotas
│ Protocolos de transferência de arquivos
│ Configuração da porta serial
│ Modem e discagem
│ Tela e teclado
│ Salvar configuração como dfl
│ Salvar configuração como
│ Sair
│ Sair do Minicom
└────────────────────────────────────────┘
Em seguida:
┌──────────────────────────────────────────────────────────┐
│ A – Dispositivo Serial : /dev/tty1
│ B – Localização do Arquivo de Travamento : /var/lock
│ C – Programa de Entrada :
│ D – Programa de Saída :
│ E – Bps/Paridade/Bits : 38400 8N1
│ F – Controle de Fluxo por Hardware : Sim
│ G – Controle de Fluxo por Software : Não
│
│ Alterar qual configuração?
└──────────────────────────────────────────────────────────┘
*Alterando as opções:
Dispositivo Serial : /dev/ttSy0
Bps/Paridade/Bits : 9600 8N1
Controle de Fluxo por Hardware : Não
</syntaxhighlight>
enable;
</syntaxhighlight>
configure terminal
</syntaxhighlight>
*Criar VLAN:
configure terminal
vlan 'numero'
name 'nome'
exit
exit
</syntaxhighlight>
*Associando portas (físicas) à VLAN:
configure terminal
interface GigabitEthernet 0/24
switchport mode access
switchport access vlan 'numero'
exit
exit
</syntaxhighlight>
*Associando IP e Servidor DHCP à VLAN:
configure terminal
interface vlan 'numero'
ip address numero_ip mascara
ip helper-address 'ip_dhcp'
exit
exit
</syntaxhighlight>
*Configurando a porta onde estará conectado o Servidor DHCP:
Esta em sua essência será uma porta trunk associada à VLAN do servidor DHCP e às VLANs onde residem os clientes DHCP.
configure terminal
interface GigabitEthernet 0/24
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 'numero1','numero2'
switchport mode trunk
</syntaxhighlight>
*Verificação de VLANS criadas via terminal:
show vlan
</syntaxhighlight>
*Configurando VLAN no servidor:
- Instalando:
apt-get install vlan
- Arquivo /etc/network/interfaces:
- s file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
address 192.168.100.251
netmask 255.255.255.0
vlan-raw-device eth1
pre-up iptables-restore < /etc/iptables.rules
</syntaxhighlight>
apt-get install bind9
apt-get install ssh
apt-get install apache2
apt-get install dhcp3-server
apt-get install iptables
apt-get install isc-dhcp-server
apt-get install postfix
apt-get install mailutils
apt-get install squirrelmail
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "caveiratar.sj.ifsc.edu.br" {
type master; file "/etc/bind/db.caveira";
}; </syntaxhighlight>
- Configurando o arquivo vi /etc/network/interfaces
- This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
- auto lo eth0 eth1
auto eth0 eth0:1 eth1
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
pre-up iptables-restore < /etc/iptables.rules
</syntaxhighlight>
- Configurando o arquivo vi /etc/postfix/main.cf
- See /usr/share/postfix/main.cf.dist for a commented, more complete version
- Debian specific: Specifying a file name will cause the first
- line of that file to be used as the name. The Debian default
- is /etc/mailname.
- myorigin = /etc/mailname
- smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
- biff = no
- appending .domain is the MUA's job.
- append_dot_mydomain = no
- Uncomment the next line to generate "delayed mail" warnings
- delay_warning_time = 4h
- readme_directory = no
- TLS parameters
- smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
- smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- smtpd_use_tls=yes
- smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
- smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
- See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
- information on enabling SSL in the smtp client.
- smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
mydomain = caveiratar.sj.ifsc.edu.br
myhostname = aluno.caveira.sj.ifsc.edu.br
myorigin = caveiratar.sj.ifsc.edu.br
- alias_maps = hash:/etc/aliases
- alias_database = hash:/etc/aliases
mydestination = aluno, caveiratar.sj.ifsc.edu.br
- relayhost =
mynetworks = 192.168.1.105,127.0.0.0/8
- mailbox_size_limit = 0
- recipient_delimiter = +
- inet_interfaces = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
inet_protocols = ipv4
~
</syntaxhighlight>
- Configurando o arquivo /etc/iptables.rules
- Generated by iptables-save v1.4.21 on Wed Nov 26 22:19:04 2014
- nat
- PREROUTING ACCEPT [59:4300]
- INPUT ACCEPT [6:424]
- OUTPUT ACCEPT [6:443]
- POSTROUTING ACCEPT [6:443]
-A POSTROUTING -s 192.168.100.1/24 -o eth0 -j MASQUERADE
COMMIT
- Completed on Wed Nov 26 22:19:04 2014
~
</syntaxhighlight>
- Configurando o arquivo /etc/bind/db.caveira
- BIND data file for local loopback interface
$TTL 604800
@ IN SOA localhost. root.localhost. (
14 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
@ IN NS ns.caveiratar.sj.ifsc.edu.br.
@ IN A 200.135.37.123
@ IN MX 10 webmail.caveiratar.sj.ifsc.edu.br.
ns IN A 200.135.37.123
www IN CNAME ns
webmail IN A 200.135.37.124
</syntaxhighlight>
- Configurando o arquivo /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.192;
option broadcast-address 200.135.37.126;
option routers 192.168.1.5;
option domain-name-servers 192.168.1.5;
option domain-name "caveiratar.sj.ifsc.edu.br";
subnet 200.135.65.0 netmask 255.255.255.192 {
range 200.135.37.70 200.135.37.90;
}
</syntaxhighlight>
- Configurando o arquivo /etc/resolv.conf
- Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
- DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 200.137.35.123
nameserver 200.137.35.124
nameserver 192.168.100.1
nameserver 8.8.8.8
~
</syntaxhighlight>
Programação para redes de computadores
Produto a entregar:Desenvolver um aplicativo Web para apoio no gerenciamento de usuários de Serviços de Telecomunicações, disponibilizados em um condomínio residencial, possuindo as opções de cadastro, listagem, pesquisa, alteração e exclusão de usuários. Assumir como chave primária o CPF do usuário.
O formulário de cadastro deverá conter os seguintes campos:
Nome do usuário;
CPF;
Tipo de Plano (1- Popular: até 512Kbps de taxa de transmissão e 1GB de espaço em disco; 2- Comum: até 2Mbps e 10GB; 3- VIP: até 10Mbps e 100GB);
Data de adesão;
Bloco/Edifício;
Apartamento;
Telefone;
E-mail;
- Programas instalados
apt-get install mysql-server
apt-get install mysql-client
apt-get install mysql-php5
apt-get install bluefish
apt-get install freeradius
- Esqueleto Banco de dados Mysql
DATABASE PROVEDOR
Cliente
Plano
Nome
Idplano
Cpf
Nome
Bloco
Valor
Idplano
Disco
Data de Adesão
Velocidade
Telefone
*
E-mail
*
Senha
*
Apto
*
*Banco de dados mysql - informações do cliente:
*Criar database provedor
create database provedor;
</syntaxhighlight>
*Acessando mysql
mysql -u root -p
</syntaxhighlight>
Cabeamento estruturado
Produtos a entregar:
Cabeamento dos enlaces ADSL e SHDL, centrais telefônicas e sistema de vigilância.
Cabeamento entre os servidores e 3 apartamentos, esses cabeamentos devem suportar o uso simultâneo de rede de dados, vigilância e telefone.
Todo o cabeamento deve ser testado, identificado e organizado.
Esquemático indicando todas as ligações, referenciando as identificações realizadas. ( entrega na Wiki).
- Topologia física cabeamento estruturado:
Equipe caveiratar feliz com as fusões de fibra ótica:
- Dia 21/11 - Instalando câmera de vigilância:
- Dia 28/11 - Distribuidor óptico 1:
- Dia 28/11 - Distribuidor óptico 2:
Instalação de equipamentos de rede
Produto a entregar:
Modem SHDL
Modem ADSL
Switch Cisco Catalyst 2960-S (já com as VLANs)
Access Point para acesso pelos condôminos
- Configuração do Switch Catalyst 2960-S
- Segurar o botão por alguns segundos efetuando o reset do switch.
- Utilizar o cabo adaptador RJ45 no switch e serial no computador.
- Abrir o terminal
sudo minicom -s
</syntaxhighlight>
*Configurando minicom:
Selecione a opção: "Configuração da porta serial"
┌─────────────[configuração]──────────────┐
│ Nomes de arquivos e rotas
│ Protocolos de transferência de arquivos
│ Configuração da porta serial
│ Modem e discagem
│ Tela e teclado
│ Salvar configuração como dfl
│ Salvar configuração como
│ Sair
│ Sair do Minicom
└────────────────────────────────────────┘
Em seguida:
┌──────────────────────────────────────────────────────────┐
│ A – Dispositivo Serial : /dev/tty1
│ B – Localização do Arquivo de Travamento : /var/lock
│ C – Programa de Entrada :
│ D – Programa de Saída :
│ E – Bps/Paridade/Bits : 38400 8N1
│ F – Controle de Fluxo por Hardware : Sim
│ G – Controle de Fluxo por Software : Não
│
│ Alterar qual configuração?
└──────────────────────────────────────────────────────────┘
*Alterando as opções:
Dispositivo Serial : /dev/ttSy0
Bps/Paridade/Bits : 9600 8N1
Controle de Fluxo por Hardware : Não
</syntaxhighlight>
enable;
</syntaxhighlight>
configure terminal
</syntaxhighlight>
*Criar VLAN:
configure terminal
vlan 'numero'
name 'nome'
exit
exit
</syntaxhighlight>
*Associando portas (físicas) à VLAN:
configure terminal
interface GigabitEthernet 0/24
switchport mode access
switchport access vlan 'numero'
exit
exit
</syntaxhighlight>
*Associando IP e Servidor DHCP à VLAN:
configure terminal
interface vlan 'numero'
ip address numero_ip mascara
ip helper-address 'ip_dhcp'
exit
exit
</syntaxhighlight>
*Configurando a porta onde estará conectado o Servidor DHCP:
Esta em sua essência será uma porta trunk associada à VLAN do servidor DHCP e às VLANs onde residem os clientes DHCP.
configure terminal
interface GigabitEthernet 0/24
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 'numero1','numero2'
switchport mode trunk
</syntaxhighlight>
*Verificação de VLANS criadas via terminal:
show vlan
</syntaxhighlight>
*Configurando VLAN no servidor:
- Instalando:
apt-get install vlan
- Arquivo /etc/network/interfaces:
- s file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto eth0 eth0:1 eth1 eth1.10 vlan11 vlan12 vlan13
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
iface eth0 inet static
address 200.135.37.123
netmask 255.255.255.192
gateway 200.135.37.126
iface eth0:1 inet static
address 200.135.37.124
netmask 255.255.255.192
gateway 200.135.37.126
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
- VLAN###########
iface eth1.10 inet static
address 192.168.100.254
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan11 inet static
address 192.168.100.253
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan12 inet static
address 192.168.100.252
netmask 255.255.255.0
vlan-raw-device eth1
iface vlan13 inet static
address 192.168.100.251
netmask 255.255.255.0
vlan-raw-device eth1
pre-up iptables-restore < /etc/iptables.rules
</syntaxhighlight>