User Tools

Site Tools


blocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
blocks [2024/10/12 00:32] protocolblocks [2024/10/12 01:22] (current) – [Notes] protocol
Line 1: Line 1:
 ===== Master ===== ===== Master =====
- 
 <code> <code>
  
Line 6: Line 5:
 ln -s /var/cache/bind/rpz/ /etc/bind/rpz ln -s /var/cache/bind/rpz/ /etc/bind/rpz
 nano /etc/bind/named.conf.local nano /etc/bind/named.conf.local
- 
  
 zone "rpz.zone" { zone "rpz.zone" {
Line 15: Line 13:
 also-notify { 172.31.255.12; }; also-notify { 172.31.255.12; };
 }; };
- 
  
 nano /var/cache/bind/rpz/db.rpz.zone.hosts nano /var/cache/bind/rpz/db.rpz.zone.hosts
- 
  
 $TTL 1H $TTL 1H
Line 31: Line 27:
 ;       ou ;       ou
 ;       NS  localhost. ;       NS  localhost.
- 
  
 nano /etc/bind/named.conf.options nano /etc/bind/named.conf.options
- 
  
 response-policy { response-policy {
 zone "rpz.zone" policy CNAME localhost; zone "rpz.zone" policy CNAME localhost;
 }; };
- 
  
 wget https://protocol.be/public/planilha_operacao_url20241011_09_10-1.dns wget https://protocol.be/public/planilha_operacao_url20241011_09_10-1.dns
Line 45: Line 38:
 chown bind: /var/cache/bind/rpz/ -R chown bind: /var/cache/bind/rpz/ -R
 systemctl restart bind9 systemctl restart bind9
- +nslookup 1996jogo.com 127.0.0.1
 </code> </code>
  
Line 55: Line 47:
 ln -s /var/cache/bind/rpz/ /etc/bind/rpz ln -s /var/cache/bind/rpz/ /etc/bind/rpz
 nano /etc/bind/named.conf.local nano /etc/bind/named.conf.local
- 
  
 zone "rpz.zone" { zone "rpz.zone" {
Line 63: Line 54:
 allow-notify { 172.31.255.11; }; allow-notify { 172.31.255.11; };
 }; };
- 
  
 nano /etc/bind/named.conf.options nano /etc/bind/named.conf.options
- 
  
 response-policy { response-policy {
 zone "rpz.zone" policy CNAME localhost; zone "rpz.zone" policy CNAME localhost;
 }; };
- 
  
 chown bind: /var/cache/bind/rpz/ -R chown bind: /var/cache/bind/rpz/ -R
 systemctl restart bind9 systemctl restart bind9
 +nslookup 1996jogo.com 127.0.0.1
 +</code>
 +
 +===== Notes =====
 +
 +ref: https://blog.remontti.com.br/7759
 +
 +
 +<code>
 +journalctl -xeu named.service -f|grep bet
 +
 +for i in $(cut -d " " -f1 bet|tr '[:upper:]' '[:lower:]'); do echo -ne "/ip dns static add disabled=no address=127.0.0.1 comment=anatel_operacao_20241011_09_10-1 name=$i\n"; done
  
 +for i in $(cut -d " " -f1 bet|tr '[:upper:]' '[:lower:]'); do echo -ne "$i\tIN CNAME .\n*.$i\tIN CNAME .\n"; done
  
 </code> </code>
blocks.1728703931.txt.gz · Last modified: 2024/10/12 00:32 by protocol