2011年9月26日 星期一

RouterOS 指定區網內DNS到路由器

 

/ip dns set primary-dns=208.67.222.222 secondary-dns=208.67.222.220 allow-remote-requests=yes


↑ 預設OpenDNS為區網所使用的DNS

/ip firewall nat add chain=dstnat action=dst-nat to-addresses=192.168.1.1 to-ports=53 in-interface=ether2 dst-port=53 protocol=tcp

/ip firewall nat add chain=dstnat action=dst-nat to-addresses=192.168.1.1 to-ports=53 in-interface=ether2 dst-port=53 protocol=udp


↑把所有給DNS的封包全部導入路由器,透過路由器預設的DNS查詢。

 

如此一來不管原本的電腦設定的DNS為何,或者是客人要借用網路,都會強迫透過OpenDNS查詢,如此一來可以有效的防止出現不該/不想出現的網站,這樣應該會比Hinet的色情守門員還要好用吧。

 

參考資料:
http://forum.mikrotik.com/viewtopic.php?f=2&t=32009#p156371

沒有留言:

張貼留言