iptable配置

[shell]

iptables   -A   OUTPUT   -d  wlt.ustc.edu.cn    -j   REJECT

[/shell]

1.创建/etc/iptables文件(文件名可以随意取)

2.创建/etc/network/if-pre-up.d/iptables文件,并给予其执行权限
root@godontop:~# touch /etc/network/if-pre-up.d/iptables
root@godontop:~# chmod +x /etc/network/if-pre-up.d/iptables
3.编辑/etc/network/if-pre-up.d/iptables文件,使其内容如下:
#!/bin/sh
/sbin/iptables-restore < /etc/iptables
4.配置iptables,过程略,配置好iptables后,将配置保存到/etc/iptables文件中即可
root@godontop:~# iptables-save > /etc/iptables