Escolar Documentos
Profissional Documentos
Cultura Documentos
#-------------------------------------------------------------------------------
# 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-------------#
-> Para finalizar, � necess�rio criar um script e colocar na inicializa��o
do sistema operacional
para que seja executado e permita o compartilhamento da intenet para a
m�quina 'Cliente'
#!/bin/bash
wan='enp0s8'
lan='enp0s9'
# cd /etc/init.d
-> Para aplicar permiss�o de execu��o, proceda com o comando abaixo:
# chmod +x /etc/init.d/firewall
#-------------------------------------------------------------------------------
# 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/*
# The loopback network interface
auto lo
iface lo inet loopback
#--------------------------------------------------------------------
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!
# ssh root@192.168.56.50
Pronto!
ewded