如图所示:两个脚本文件
iptables_work.sh
井号/bin/bash
iptables -A OUTPUT -p ALL -d www.baidu.com -j REJECT
工作时间不允许访问百度
iptables_rest.sh
井号/bin/bash
iptables -D OUTPUT -p ALL -d www.baidu.com -j REJECT
不工作时允许访问百度。
如图所示:两个脚本文件
iptables_work.sh
井号/bin/bash
iptables -A OUTPUT -p ALL -d www.baidu.com -j REJECT
工作时间不允许访问百度
iptables_rest.sh
井号/bin/bash
iptables -D OUTPUT -p ALL -d www.baidu.com -j REJECT
不工作时允许访问百度。