このブログを検索

この記事の内容は、個人の見解、検証の範囲のものであり、誤りがある可能性があります。
個人の責任において情報活用をお願いします。


2018年3月29日木曜日

【VyOS】VyOSでWebプロキシサーバーを設定してみた その3 ブラックリストを利用してみよう 準備編 その1


だいぶ時間が経ってしまいましたが、私が検証でよく使うVyOSを使ったWebプロキシをいろいろと試してみたいと思います。

~VyOSでWebプロキシを設定してみた~
1.Webプロキシを試してみた
2.ホワイトリストを試してみた
3.ブラックリストを試してみた 
  準備編 その1:ブラックリストをダウンロード ←今回



今回から数回に渡り、Webプロキシのブラックリストを試してみます。
今回は準備編です。VyOSに手動でブラックリストを設定することもできますが、用意されているブラックリストファイルをダウンロードして利用することもできます。今回は、用意されているブラックリストファイルをダウンロードしてVyOSでブラックリストを利用できるようにします。ダウンロードは以下のコマンドを実行します。

update webproxy blacklists
実際に実行すると下記のようにブラックリストのファイルがダウンロードされ、VyOSに展開されます。
ファイルはヨーロッパにある大学のFTPサーバーからダウンロードされます。

vyos@vyos:~$ update webproxy blacklists
Would you like to re-download the blacklist? [confirm][y]
Connecting to ftp.univ-xxxx.xx (xxx.xx.xx.xxx:21)
blacklists.gz        100% |**********************************************************| 10858k 00:00:00 ETA
Uncompressing blacklist...
Checking permissions...
Skip link for   [ads] -> [publicite]
Building DB for [adult/domains] - 1926933 entries
Building DB for [adult/urls] - 67608 entries
Skip link for   [aggressive] -> [agressif]
Building DB for [agressif/domains] - 324 entries
Building DB for [agressif/urls] - 36 entries
Building DB for [arjel/domains] - 69 entries
Building DB for [associations_religieuses/domains] - 1 entries
Building DB for [astrology/domains] - 28 entries
Building DB for [astrology/urls] - 1 entries
Building DB for [audio-video/domains] - 3237 entries
Building DB for [audio-video/urls] - 162 entries
Building DB for [bank/domains] - 1698 entries
Building DB for [bitcoin/domains] - 252 entries
Building DB for [bitcoin/urls] - 3 entries
Building DB for [blog/domains] - 1469 entries
Building DB for [blog/urls] - 2 entries
Building DB for [celebrity/domains] - 636 entries
Building DB for [celebrity/urls] - 39 entries
Building DB for [chat/domains] - 213 entries
Building DB for [chat/urls] - 17 entries
Building DB for [child/domains] - 68 entries
Building DB for [child/urls] - 2 entries
Building DB for [cleaning/domains] - 170 entries
Building DB for [cleaning/urls] - 3 entries
Building DB for [cooking/domains] - 16 entries
Building DB for [cryptojacking/domains] - 2522 entries
Building DB for [dangerous_material/domains] - 28 entries
Building DB for [dangerous_material/urls] - 21 entries
Building DB for [dating/domains] - 3563 entries
Building DB for [dating/urls] - 10 entries
Building DB for [ddos/domains] - 232 entries
Building DB for [download/domains] - 51 entries
Building DB for [download/urls] - 15 entries
Building DB for [drogue/domains] - 591 entries
Building DB for [drogue/urls] - 464 entries
Skip link for   [drugs] -> [drogue]
Building DB for [educational_games/domains] - 8 entries
Building DB for [educational_games/urls] - 2 entries
Building DB for [filehosting/domains] - 825 entries
Building DB for [filehosting/urls] - 8 entries
Building DB for [financial/domains] - 79 entries
Building DB for [financial/urls] - 1 entries
Building DB for [forums/domains] - 189 entries
Building DB for [forums/urls] - 20 entries
Building DB for [gambling/domains] - 1116 entries
Building DB for [gambling/urls] - 4 entries
Building DB for [games/domains] - 9557 entries
Building DB for [games/urls] - 1592 entries
Building DB for [hacking/domains] - 268 entries
Building DB for [hacking/urls] - 33 entries
Building DB for [jobsearch/domains] - 385 entries
Building DB for [lingerie/domains] - 65 entries
Building DB for [lingerie/urls] - 6 entries
Building DB for [liste_blanche/domains] - 239 entries
Building DB for [liste_blanche/urls] - 2 entries
Building DB for [liste_bu/domains] - 2743 entries
Building DB for [liste_bu/urls] - 94 entries
Building DB for [local-ok-default/domains] - 1 entries
Building DB for [local-ok-url-default/urls] - 1 entries
Skip link for   [mail] -> [forums]
Building DB for [malware/domains] - 3478 entries
Building DB for [malware/urls] - 11365 entries
Building DB for [malware/expressions] - 1 entries
Building DB for [manga/domains] - 542 entries
Building DB for [manga/urls] - 194 entries
Building DB for [marketingware/domains] - 819 entries
Building DB for [marketingware/urls] - 2 entries
Building DB for [mixed_adult/domains] - 145 entries
Building DB for [mixed_adult/urls] - 7 entries
Building DB for [mobile-phone/domains] - 44 entries
Building DB for [mobile-phone/urls] - 2 entries
Building DB for [phishing/domains] - 63502 entries
Building DB for [phishing/urls] - 6 entries
Skip link for   [porn] -> [adult]
Building DB for [press/domains] - 4451 entries
Building DB for [press/urls] - 1 entries
Skip link for   [proxy] -> [redirector]
Building DB for [publicite/domains] - 1123 entries
Building DB for [publicite/urls] - 306 entries
Building DB for [publicite/expressions] - 1 entries
Building DB for [radio/domains] - 484 entries
Building DB for [radio/urls] - 10 entries
Building DB for [reaffected/domains] - 7 entries
Building DB for [reaffected/urls] - 1 entries
Building DB for [redirector/domains] - 129148 entries
Building DB for [redirector/urls] - 292 entries
Building DB for [remote-control/domains] - 41 entries
Building DB for [remote-control/urls] - 1 entries
Building DB for [sect/domains] - 143 entries
Building DB for [sect/urls] - 1 entries
Building DB for [sexual_education/domains] - 11 entries
Building DB for [sexual_education/urls] - 8 entries
Building DB for [shopping/domains] - 36401 entries
Building DB for [shopping/urls] - 3 entries
Building DB for [shortener/domains] - 262 entries
Building DB for [social_networks/domains] - 641 entries
Building DB for [social_networks/urls] - 1 entries
Building DB for [special/domains] - 1 entries
Building DB for [special/expressions] - 1 entries
Building DB for [sports/domains] - 2277 entries
Building DB for [strict_redirector/domains] - 129148 entries
Building DB for [strict_redirector/urls] - 21 entries
Building DB for [strict_redirector/expressions] - 1 entries
Building DB for [strong_redirector/domains] - 129148 entries
Building DB for [strong_redirector/urls] - 21 entries
Building DB for [strong_redirector/expressions] - 1 entries
Building DB for [translation/domains] - 166 entries
Building DB for [translation/urls] - 4 entries
Building DB for [tricheur/domains] - 27 entries
Building DB for [tricheur/urls] - 19 entries
Building DB for [update/domains] - 5 entries
Skip link for   [violence] -> [agressif]
Building DB for [warez/domains] - 885 entries
Building DB for [warez/urls] - 14 entries
Building DB for [webmail/domains] - 332 entries
Building DB for [webmail/urls] - 9 entries

The webproxy daemon must be restarted
Would you like to restart it now? [confirm][y]
Restarting Squid HTTP Proxy 3.x: squid3 Waiting.....................done.
.
vyos@vyos:~$
ダウンロードしたブラックリストには何が含まれているのか確認します。
まず、VyOSでブラックリストを確認するコマンドを確認します。
vyos@vyos:~$ show webproxy blacklist まで入力しタブキーを押します。

vyos@vyos:~$ show webproxy blacklist 
Possible completions:
  categories    Show webproxy blacklist categories
  domains       Show webproxy blacklist domains
  log           Show contents of webproxy blacklist log
  search        Show webproxy blacklist search
  urls          Show webproxy blacklist urls


vyos@vyos:~$

ブラックリストのカテゴリ、ドメイン、ログ、検索、URLを確認できるようです。
今回は、カテゴリーを確認します。下記コマンドを実行します。

show webproxy blacklist categories
下記カテゴリを利用できることが確認できます。

vyos@vyos:~$ show webproxy blacklist categories
ads
adult
aggressive
agressif
arjel
associations_religieuses
astrology
audio-video
bank
bitcoin
blog
celebrity
chat
child
cleaning
cooking
cryptojacking
dangerous_material
dating
ddos
dialer
download
drogue
drugs
educational_games
filehosting
financial
forums
gambling
games
hacking
jobsearch
lingerie
liste_blanche
liste_bu
local-ok-default
local-ok-url-default
mail
malware
manga
marketingware
mixed_adult
mobile-phone
phishing
porn
press
proxy
publicite
radio
reaffected
redirector
remote-control
sect
sexual_education
shopping
shortener
social_networks
special
sports
strict_redirector
strong_redirector
translation
tricheur
update
violence
warez
webmail
vyos@vyos:~$
どんなカテゴリを利用できるのかわかりました。
では、カテゴリにはどんなドメインが入っているのか?
次回、確認してみます。それでは。