-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.sh
234 lines (162 loc) · 6.06 KB
/
config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
#!/bin/bash
#
# Kit Configuration File
##############################
# Lists to be processed
# Currently available options are:
# manuale - For manually added FQDN or IPv4
# aams - For AAMS Lists
# tabacchi - For ADM Lists (Tobacco and Gambling)
# agcom - For AGCOM Lists (Copyright infringment)
# cncpo - For CNCPO Lists (anti-pedophilia)
# consob - For CONSOB Lists (Trading) - Not Mandatory and BROKEN right now since they have implemented anti-bot protection.
# pscaiip - For Privacy Shield FQDN or IPv4 created by exteral tool provided by AIIP (Associazione Italiana Internet Provider)
LISTS="manuale aams tabacchi agcom consob cncpo pscaiip"
# Lists to be downloaded/updated
# You might use all lists here. To be used to keep old
# lists active but you don't want to download or update
# new records
UPDATE_LISTS=$LISTS
########### Alerting
# Set true to enable alerting
ALERT_ENABLE=true
# insert NOC email to enable alerting
NOC_EMAIL=''
#NOC_EMAIL=''
# sender address
FROM_EMAIL='[email protected]'
##################### CNCPO ########################
# CNCPO PEC IMAP SERVER
CNCPO_IMAP_SERVER='mail.pecprovider.it'
# CNCPO PEC USERNAME
CNCPO_IMAP_USER='[email protected]'
# CNCPO PEC PASSWORD
CNCPO_IMAP_PSWD='Shhh Dont tell anyone'
# CNCPO ARCHIVE IMAP FOLDER
CNCPO_IMAP_ARCHIVE_FOLDER='Archive'
# CNCPO SENDER
CNCPO_MAIL_FROM='[email protected]'
# CNCPO ATTACHMENT FILE NAME
CNCPO_FILENAME='blacklist.csv.gpg'
# CNCPO ENCRYPTED FILENAME
CNCPO_FILE_NAME_CRYPT='blacklist.crypted'
# CNCPO DECRYPTED FILENAME
CNCPO_FILE_NAME_DECRYPT='blacklist.decrypted'
# CNCPO GPG PATH
CNCPO_GPG_PATH='/usr/bin/gpg'
# CNCPO WORKING DIR
CNCPO_WORKING_DIR='cncpo'
# CNCPO DOWNLOAD DIR
CNCPO_DOWNLOAD_DIR='download'
# CNCPO SETTING TEMPLATE FILE (DO NOT CHANGE)
CNCPO_SETTINGS_TMPL='settings.yaml.template'
# IMPORT PRIVATE KEY AUTOMATICALLY AT EACH RUN?
GPG_IMPORT_KEY=true
# GPG PRIVATE KEYFILE TO BE IMPORTED
GPG_PRIVATE_KEY="gpg/private.gpg"
# GPG KEYFILE PASSWORD
GPG_KEY_PASSWORD='Shhh Dont tell anyone'
# GPG Import Args
GPG_IMPORT_ARGS="--batch --pinentry-mode loopback --passphrase $GPG_KEY_PASSWORD"
# Local File for CNCPO
FILE_cncpo='tmp/blacklist.csv'
# GPG Decrypt Args
GPG_DECRYPT_ARGS="--batch --pinentry-mode loopback --passphrase $GPG_KEY_PASSWORD"
# SEND Automatic Reply?
CNCPO_REPLY_ENABLED=true
# Reply message Subject
CNCPO_REPLY_SUBJECT="Messaggio di avvenuta ricezione lista filtraggi CNCPO"
# Reply message Sender
CNCPO_REPLY_SENDER=$CNCPO_IMAP_USER
# Reply message Recipient
CNCPO_REPLY_DESTINATION=$CNCPO_MAIL_FROM
# Put NOC In Copy of Reply message
CNCPO_REPLY_CC=$NOC_EMAIL
# SNMP Server
CNCPO_SMTP_SERVER=$CNCPO_IMAP_SERVER
# SNMP Authentication User
CNCPO_REPLY_USERNAME=$CNCPO_IMAP_USER
# SNMP Authentication PASSWORD
CNCPO_REPLY_PASSWORD=$CNCPO_IMAP_PSWD
# Reply Message Template.
# Underscore variables (_LISTAID_ , _LISTADATE_ and _DATE_) will be replaced automatically
CNCPO_REPLY_TEMPLATE="Buongiorno,
con la presente si segnala che in data _DATE_ e' avvenuta ricezione e applicazione della lista dei siti da inibire per il CNCPO avente progressivo _LISTAID_ e identificativo _LISTADATE_.
Il messaggio e' stato generato automaticamente, pertanto vi preghiamo di segnalare qualsiasi eventuale problema o incorrettezza del presente riscontro.
Cordiali Saluti.
Acme S.p.A.
"
##################### AGCOM ########################
# AGCOM URL
#URL_agcom='https://www.agcom.it/provvedimenti-a-tutela-del-diritto-d-autore'
# UPDATE: Since agcom changed his website to one that is un-parsable, the agcom list has to become manually updated.
# Just put your FQDN lists in the lista.agcom file.
# Local File for AGCOM
FILE_agcom='lista.agcom'
# Skip SHA256 Checks
#SKIP_SHA256_CKSUM=true
##################### MANUALE ########################
# Local file for Manuale
FILE_manuale='lista.manuale'
##################### PSCAIIP ########################
# Local file for Piracy Shield Client by AAIP
PATH_pscaiip='/opt/piracy-shield-agent-main/'
# List name
FILE_pscaiip='lista.pscaiip'
# File Paths
PATH_pscaiip_fqdn='/opt/piracy-shield-agent-main/src/storage/app/fqdn/last.txt'
PATH_pscaiip_ipv4='/opt/piracy-shield-agent-main/src/storage/app/ipv4/last.txt'
PATH_pscaiip_ipv6='/opt/piracy-shield-agent-main/src/storage/app/ipv6/last.txt'
# Since the Piracy Shield's server are often overloaded
# there is a random sleep option
PSCAIIP_RANDOM_SLEEP=true
# Maximum sleep time in seconds (default 30)
PSCAIIP_MAXWAIT=30
# Send Email on PSC ERROR?
ALERT_PSCAIIP_ENABLE=true
##################### CONSOB ########################
# Local file for Consob list
FILE_consob='lista.consob'
##################### AAMS ########################
# curl options for aams
CURL_OPTS_aams=''
##################### DNS SECTION ########################
# path of the file on each remote target DNS server
CONFFILE='/etc/bind/censura/named.conf'
# list of target DNS servers
# do not waste too much time trying to connect to unresponsive remote servers
RSYNC_OPTIONS='--timeout=30 -rt'
# the local file
CONF='lists/named.conf'
# local full ip list
CONF_IP='lists/ip-fullist'
# the directory on the name servers containing the zone files
CONFDIR='/etc/bind/censura'
############ External Tools
# Download Helper for agcom
AGCOM_DOWNLOAD_HELPER='download_agcom.py'
# Download Helper for consob
CONSOB_DOWNLOAD_HELPER='download_consob.py'
# Download Helper for CNCPO (in CNCPO_WORKING_DIR)
CNCPO_DOWNLOAD_HELPER='download_attachment.py'
# Reply Helper for CNCPO (in CNCPO_WORKING_DIR)
CNCPO_EMAIL_SENDER='email_sender.py'
############ Blackholing
# Lists to be applied for blackholing
ROUTES_LISTS='cncpo'
# Blackhole Nexthop
BLACKHOLE_NEXTHOP='192.168.254.254'
# Aggregate route?
AGGREGATE_PREFIX=true
# Aggregated prefix list path
AGGREGATE_LIST_FILE='lists/cidr-fullist'
# Tool for cidr summarization
AGGREGATION_TOOL='supernets.py'
# Maximum CIDR length (default 25)
AGGREGATION_MAXLEN=25
############ Logging
# Set true to enable logging to file
LOGGING_ENABLE=true
# Logfile path
LOGFILE='/var/log/kit-censura.log'