2017年9月25日

ubuntu dns 限制遞迴查詢

個人做法如下
sudo -s


cd /etc/bind/

 vim named.conf.options

options {
        directory "/var/cache/bind";
        managed-keys-directory "/etc/bind";
後加入下列

        allow-transfer {"none";};
        allow-recursion {"none";};
        recursion no;
        allow-query { any; };
存檔完後重啟bind9
 /etc/init.d/bind9 restart

做完之後使用nslookup查詢
sever 163.20.xx.1

> server 163.20.xx.1
Default server: 163.20.xx.1
Address: 163.20.xx.1#53
> dns.xx.ntpc.edu.tw.
Server:        163.20.xx.1
Address:    163.20.xx.1#53

dns.xx.ntpc.edu.tw    canonical name = ntpdc.xx.ntpc.edu.tw.
Name:    ntpdc.xx.ntpc.edu.tw
Address: 163.20.xx.1
> www.ntpc.edu.tw
Server:        163.20.xx.1
Address:    163.20.xx.1#53

** server can't find www.ntpc.edu.tw: REFUSED
你只可以查詢校內的dns資料,查詢其他的會回應查不到

allow-query 是回應可以查詢的網段

         allow-transfer {"none";};
        allow-recursion {"none";};
        recursion no;
是禁止 遞迴查詢

參考資料:
http://wiki.weithenn.org/cgi-bin/wiki.pl?bind9-%E6%8F%90%E4%BE%9BDomain_Name%E8%88%87IP%E5%B0%8D%E6%87%89%E7%9A%84%E6%9C%8D%E5%8B%99#Heading8

http://www.cc.ntu.edu.tw/chinese/epaper/0028/20140320_2809.html


保太提供指令查詢
sudo nmap -sU 53 --script=dns-recursion 10.231.1.1/24



使用nslookup查資料時
在校內
server 163.20.xx.1
只能查到自己管的domain




其他的會顯示查不到

nslookup
> server 163.20.xx.1
Default server: 163.20.xx.1
Address: 163.20.xx.1#53
> dns.xx.ntpc.edu.tw
Server:        163.20.xx.1
Address:    163.20.xx.1#53

dns.xx.ntpc.edu.tw    canonical name = ntpdc.xx.ntpc.edu.tw.
Name:    ntpdc.xx.ntpc.edu.tw
Address: 163.20.xx.1
> www.hinet.net
Server:        163.20.xx.1
Address:    163.20.xx.1#53

** server can't find www.hinet.net: REFUSED
> exit


在校外
 nslookup
> server 163.20.xx.1
Default server: 163.20.xx.1
Address: 163.20.xx.1#53
> dns.xx.ntpc.edu.tw
Server:        163.20.xx.1
Address:    163.20.xx.1#53

** server can't find dns.xx.ntpc.edu.tw: REFUSED
> exit

scratch2 ubuntu 16.10

scratch2無法在ubuntu 16.10以上的版本正常安裝,記錄一下。

https://askubuntu.com/questions/913892/how-to-install-scratch-2-on-ubuntu-16-10-or-17-04-64bit/913912

 士立把相關步驟整理成 script,https://drive.google.com/open?id=0B_wx0SuvjnGWcFFDYU1HdmRFSG8

app教學應用

教學App建議

https://drive.google.com/file/d/0B2yz3b46vC7hYWNENWNINDZYRWc/view

http://www.quivervision.com/

https://www.aurasma.com/

利用BAR app自製擴增實境應用

aurasma教學

張原禎頻道


 大學塾

原禎的集合
https://drive.google.com/drive/folders/0BzcX1hxgTb1ocUpZZVZyZWpQN00?usp=sharing


https://www.ccr.tw/
https://ccr.tw/

2017年9月5日

scratch2新增範例圖庫

想要在scratch2中新增範例圖庫,查找好久,終於研究一點心得。
1.先把角色在scratch2中完成匯入,匯完後再匯出成.sprite2檔案。
2.把.sprite2解壓縮出來。裡面會有圖檔、聲音檔和.jesson

3.把圖檔改名成想要的名字

4.複製一份起來。方便比對。
5.轉成md5編碼,把檔名做md5編碼,在終端機中輸入
echo "fire-ball" |md5sum
a3acee5e8121992b14d2799b13550487  -
取得字串 a3acee5e8121992b14d2799b13550487把wav和jesson改成此字串
 "fire-ball-0" |md5sum
c53e3c8e2e79e127eb7bb2a576b672eb  -
 echo "fire-ball-1" |md5sum
461e19ba7e5a5b4709940375fc284708  -
 
6.編修.jesson把svg和wav檔換成md5的文字
 vim a3acee5e8121992b14d2799b13550487.json  

6.把檔案複製到/opt/Scratch 2/share/media/
sudo cp * /opt/Scratch\ 2/share/media/

7.編輯/opt/Scratch\ 2/share/media/libs/spriteLibrary.json檔案
vim /opt/Scratch\ 2/share/media/libs/spriteLibrary.json
找到相關檔複製來改,我用apple來改
相同方式,只有一個svg檔也可以新增,建議svg也要做比較好。