Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
-----------------------------
Disciplina: Administração de Servidores
Professor: Alexandre de Aguiar Amaral
Data: 18 de agosto de 2019
Aluno: Gerson Pereira (gerson@embracore.com.br)
3) Criar o Gateway
-> Criar uma máquina linux com Ubuntu Server 16.04 LTS
* 1 cpu
* 512 RAM
* HD 8GB
* 1 interface de rede: Placa de rede exclusiva de hospedeiro (Host
Only)
* 1 interface de rede: NAT
* 1 interface de rede: Rede interna
* Desativar audio
-> A primeira coisa que devemos fazer após instalar o LINUX, é redefinir a
senha
do 'root'.
$ sudo passwd
Onde encontra-se:
PermitRootLogin prohibit-password
mude para
PermitRootLogin yes
# /etc/init.d/ssh restart
#-------------------------------------------------------------------------------
# This file describes the network interfaces available on your
system
# and how to activate them. For more information, see
interfaces(5).
source /etc/network/interfaces.d/*
#--------------------------------------------------------------------
auto enp0s3
iface enp0s3 inet static
address 192.168.56.50
netmask 255.255.255.0
network 192.168.56.0
#--------------------------------------------------------------------
auto enp0s8
iface enp0s8 inet dhcp
#--------------------------------------------------------------------
auto enp0s9
iface enp0s9 inet static
address 10.0.0.1
netmask 255.255.255.0
#-------------------------------------------------------------------------------
#---------INICIO----------#
#deny unknown-clients;
ddns-update-style none;
update-static-leases on;
ignore client-updates;
default-lease-time 3600;
max-lease-time 43200;
authoritative;
option wpad-url code 252 = text;
ddns-domainname "testeifc.net.";
option domain-name "testeifc.net.";
subnet 10.0.0.0 netmask 255.255.255.0
{
INTERFACES="enp0s9";
range 10.0.0.100 10.0.0.199;
option routers 10.0.0.1;
option domain-name-servers 8.8.8.8,8.8.4.4;
option broadcast-address 10.0.0.255;
option wpad-url "http://10.0.0.1/wpad.dat\n";
host note_do_gerson
{
hardware ethernet
64:1c:67:97:79:f3;
fixed-address 10.0.0.228;
}
#---------FIM-------------#
#!/bin/bash
wan='enp0s8'
lan='enp0s9'
echo "Ativando firewall..."
# cd /etc/init.d
# chmod +x /etc/init.d/firewall
# ssh root@192.168.56.50
Pronto!