### InterfaceFast
/interface ethernet

# SFP
set [ find default-name=sfp1 ] name="SFP1_"
set [ find default-name=sfp2 ] name="SFP2_"
set [ find default-name=sfp3 ] name="SFP3_"
set [ find default-name=sfp4 ] name="SFP4_"

# Criar Bridge para a LAN
/interface bridge
add name="bridge-LAN"

/interface bridge port

/interface ethernet

# Configurar DNS
### RedeDNS = Morrinhos
/ip dns set allow-remote-requests="no" cache-size="4096KiB" max-udp-packet-size="512" \ servers="131.72.175.33,131.72.175.34"

# Configurar SNMP
/snmp community set [ find default=yes ] name="" write-access=no
/snmp set contact="" enabled="no" location="" \ trap-community="" trap-version=2

# TimeZone
/system clock set time-zone-name=America/Sao_Paulo

# Configurar NTP
/system ntp client set enable=yes primary-ntp=200.160.7.186 secondary-ntp=200.189.40.8

# Configurar Identify
/system identity set name=""

# Usuário e Senhas
/user group
set read policy=read,test,winbox,sniff,sensitive,api,!local,!telnet,!ssh,!ftp,!reboot,!write,!policy,!password,!web
set write policy=local,telnet,reboot,read,write,test,winbox,web,sniff,sensitive,api,!ssh,!ftp,!policy,!password


/user add name=lanteca password=Ltc@80@ group="full"
/user set admin name=admltc password="Eg+KIS$.Zfh"

# Configuração Firewall
/ip service
set ssh port=5122
set telnet disable=yes
set www disable=yes
set ftp disable=yes
set api disable=yes
set api-ssl disable=yes
set winbox port=2524
/ip firewall connection tracking
set enabled=yes
/ip firewall filter
/ip firewall address-list
add address=186.251.72.12 list="sites permitidos"
add address=131.72.172.0/22 list=REDE_LANTECA
add address=138.122.220.0/22 list=REDE_LANTECA
add address=186.251.72.0/21 list=REDE_LANTECA
add address=170.84.244.0/22 list=REDE_LANTECA
add address=192.168.0.0/16 list=REDE_LANTECA
add address=172.16.0.0/12 list=REDE_LANTECA
add address=10.0.0.0/8 list=REDE_LANTECA
add address=10.0.0.0/8 list=PRIVADOS
add address=172.16.0.0/12 list=PRIVADOS
add address=192.168.0.0/16 list=PRIVADOS

# Configuração WAN
/interface ethernet
set [ find default-name="ether0" ] name="WAN"
### WAN = PPPoE
/interface pppoe-client add interface="WAN" name=pppoe-client-WAN password="" \ user="" add-default-route=yes default-route-distance=10 disabled=no allow=pap

# Configuração LAN
/ip address
add address=10.0.0.1/24 interface=bridge-LAN

# Configuração do Pool de IP
/ip pool
add name=Pool_LAN ranges=10.0.0.100-10.0.0.200

# Congiguração DHCP
/ip dhcp-server
add name=DHCP_Local interface=bridge-LAN lease-time=12:00:00 address-pool=Pool_LAN authoritative=yes disabled=no

### RedeDNS = Morrinhos
/ip dhcp-server network add address=10.0.0.0/24 gateway=10.0.0.1 dns-server=131.72.175.33,131.72.175.34 netmask=24

# Configura MASQUERADE
/ip firewall nat
add chain=srcnat src-address=10.0.0.0/24 action=masquerade