最近買了 TP-LINK TL-WR1043ND 這個玩具, 當然順手刷上 DD-WRT
壹電視基本上只要開 ICMP (ping), DNS (tcp/udp 53), NTP (udp 123), HTTP/HTTPS (tcp 80/443) 就可以了. 以下是壹電視 server 網段列表:
63.221.156.0/24 80.77.6.0/24 203.69.108.0/23 203.192.135.0/24 203.208.204.0/24
以下是 DD-WRT 的 firewall rules (從 web 管理介面進去, administration --> commands, 然後在 command shell 輸入下面指令, 按 save firewall 即可)
以上... 呵呵呵呵~~~iptables -I FORWARD 1 -i br0 -p icmp \ -s [BOX-IP] -j ACCEPT iptables -I FORWARD 2 -i br0 -p udp -m multiport \ -s [BOX-IP] --dport 53,123 -j ACCEPT iptables -I FORWARD 3 -i br0 -p tcp \ -s [BOX-IP] --dport 53 -j ACCEPT iptables -I FORWARD 4 -i br0 -p tcp -m multiport \ -s [BOX-IP] -d 63.221.156.0/24 --dport 80,443 -j ACCEPT iptables -I FORWARD 5 -i br0 -p tcp -m multiport \ -s [BOX-IP] -d 80.77.6.0/24 --dport 80,443 -j ACCEPT iptables -I FORWARD 6 -i br0 -p tcp -m multiport \ -s [BOX-IP] -d 203.192.135.0/24 --dport 80,443 -j ACCEPT iptables -I FORWARD 7 -i br0 -p tcp -m multiport \ -s [BOX-IP] -d 203.208.204.0/24 --dport 80,443 -j ACCEPT iptables -I FORWARD 8 -i br0 -p tcp -m multiport \ -s [BOX-IP] -d 203.69.108.0/23 --dport 80,443 -j ACCEPT iptables -I FORWARD 9 -i br0 -s [ETV-BOX-IP] -j REJECT(有 \ 的跟前一行相連)
1 comment:
其實改成
iptables -I FORWARD 1 -i br0 -p icmp -s [BOX-IP] -j ACCEPT
iptables -I FORWARD 2 -i br0 -p udp -m multiport -s [BOX-IP] --dport 53,123 -j ACCEPT
iptables -I FORWARD 3 -i br0 -p tcp -m multiport -s [BOX-IP] --dport 53,80,443 -j ACCEPT
iptables -I FORWARD 4 -i br0 -s [BOX-IP] -j REJECT
應該也是可以的....
Post a Comment