Compare commits

...
10 Commits
Author SHA1 Message Date
tiago.ferreira 7c52a4785e Atualizar server1.sh 2025-10-15 00:07:22 +00:00
tiago.ferreira 31813d0930 Atualizar router.sh 2025-10-15 00:01:54 +00:00
tiago.ferreira 25cedaa6eb Atualizar server1.sh 2025-10-14 23:54:51 +00:00
tiago.ferreira 23e044ea5a Atualizar server1.sh 2025-10-14 23:52:18 +00:00
tmferreira-ti 073e425ee2 . 2025-10-14 20:47:24 -03:00
tmferreira-ti 72626cb3bd Create named.conf.options 2025-10-14 20:38:17 -03:00
tmferreira-ti 374485866b . 2025-09-12 09:41:08 -03:00
tmferreira-ti fbdbf7a195 Update router.sh 2025-09-12 09:38:15 -03:00
tmferreira-ti 61e8102c6d Update router.sh 2025-09-12 09:37:48 -03:00
tmferreira-ti fa005bdd94 Update router.sh 2025-09-12 09:34:36 -03:00
7 changed files with 116 additions and 7 deletions
+24
View File
@@ -0,0 +1,24 @@
$TTL 3600 ; Tempo de vida das respostas fornecidas pelo DNS (cache) (1H)
@ IN SOA ns1.fatecseg.edu.br. hostmaster.fatecseg.edu.br. (
2024020901 ; Serial para controle de atualizações entre master e slave
28800 ; Tempo de atualizações entre master e slave (refresh) (8H)
7200 ; Tempo de atualizações caso o refresh falhe (2H)
604800 ; Tempo de expiração do slave caso não contate o master (7 dias)
7200 ) ; Tempo de vida das repostas negativas do servidor (2H)
NS ns1.fatecseg.edu.br.
NS ns2.fatecseg.edu.br.
IN MX 10 smtp.fatecseg.edu.br.
IN MX 20 smtp2.fatecseg.edu.br.
fatecseg.edu.br. A 192.168.200.2
ns1 A 192.168.200.2
ns2 A 192.168.200.5
www A 192.168.200.2
smtp A 192.168.200.3
smtp2 A 192.168.200.4
pop3 A 192.168.200.5
blog A 192.168.200.6
ftp A 192.168.200.3
webmail CNAME pop3
zabbix CNAME www
+5
View File
@@ -0,0 +1,5 @@
// DNS
zone "fatecseg.edu.br" IN {
type master;
file "/etc/bind/domains/fatecseg/db.fatecseg.edu.br";
};
+35
View File
@@ -0,0 +1,35 @@
acl "rede_interna" {
172.17.0.0/24; // Definição de uma ACL (Access Control List) chamada "rede_interna", permitindo o intervalo de IPs 172.17.0.0/24.
192.168.200.0/24;
};
options {
directory "/var/cache/bind"; // Diretório onde o BIND armazena arquivos de cache.
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders { // Configuração de servidores de encaminhamento para resolver consultas DNS.
8.8.8.8; // Google Public DNS (primário).
8.8.4.4; // Google Public DNS (secundário).
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation no; // Desativa a validação DNSSEC.
minimal-responses yes; // Respostas mínimas, enviando apenas os dados necessários na resposta DNS.
version "Empresa FatecSeg"; // Define uma string personalizada para a versão do BIND que será exibida.
allow-query-cache { rede_interna; }; // Permite cache de consultas para a ACL "rede_interna".
allow-query { any; }; // Permite consultas DNS de qualquer origem.
allow-recursion { rede_interna; }; // Permite recursão DNS apenas para a ACL "rede_interna".
listen-on-v6 { any; }; // Escuta requisições em qualquer interface IPv6.
};
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo "Atualizando!!!" echo "Atualizando!!!"
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/src/branch/main/Gerente/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Gerente/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache
reboot reboot
+6 -4
View File
@@ -1,14 +1,16 @@
#!/bin/bash #!/bin/bash
echo "Atualizando!!" echo "Atualizando!!"
sleep 5
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Router/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Router/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/src/branch/main/Router/sysctl.conf -O /etc/sysctl.conf --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Router/sysctl.conf -O /etc/sysctl.conf --no-check-certificate --no-cache
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/src/branch/main/Router/nftables.conf -O /etc/nftables.conf --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Router/nftables.conf -O /etc/nftables.conf --no-check-certificate --no-cache
systemctl enable nftables systemctl enable nftables
#> /etc/nftables.conf
#sed -i '28s/^/#/' arquivo.txt
reboot reboot
+44 -1
View File
@@ -1,6 +1,49 @@
#!/bin/bash #!/bin/bash
echo "Atualizando!!!" echo "Atualizando!!!"
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/src/branch/main/Server1/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Server1/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache
apt update
apt install bind9 -y
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Server1/named.conf.options -O /etc/bind/named.conf.options --no-check-certificate --no-cache
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Server1/named.conf.local -O /etc/bind/named.conf.local --no-check-certificate --no-cache
mkdir -p /etc/bind/domains/fatecseg/
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Server1/db.fatecseg.edu.br -O /etc/bind/domains/fatecseg/db.fatecseg.edu.br --no-check-certificate --no-cache
apt install apache2 -y
apt install mariadb-server -y
apt install php php-mysql libapache2-mod-php php-curl php-gd php-mbstring php-mcrypt php-xml php-xmlrpc -y
wget https://github.com/tmferreira-ti/ASOR/raw/refs/heads/main/Confs/srv2/Apache/fatecseg.conf -O /etc/apache2/sites-available/site.conf --no-check-certificate --no-cache
mkdir /dados/paginas/fatecseg -p
a2ensite site.conf
a2dissite 000-default.conf
mysql -u root -p -e "CREATE DATABASE wordpress;"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';"
mysql -u root -p -e "FLUSH PRIVILEGES;"
cd /dados/paginas/fatecseg/
rm -f index.html
wget wordpress.org/latest.tar.gz
tar --strip-components=1 -xzvf latest.tar.gz
rm -f latest.tar.gz
chown www-data: -R /dados/paginas/fatecseg/
reboot reboot
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
echo "Atualizando!!!" echo "Atualizando!!!"
wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/src/branch/main/Server2/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache wget https://git.tmferreira.tec.br/tiago.ferreira/GRC/raw/branch/main/Server2/interfaces -O /etc/network/interfaces --no-check-certificate --no-cache
reboot reboot