摘要:
iptables设定的规则,掉电重启会清空。若需要保存,最好是使用iptables-save/restore配合重定向,示例如下: iptables-save > /etc/network/iptables-config iptables-restore < /etc/network/iptable 阅读全文
摘要:
前段时间,我使用iptables实现了针对IP地址与MAC地址的白名单功能,即将INPUT链的默认规则设为DROP: iptables -P INPUT DROP 这样就能拒绝一切外来报文。随后只需要添加规则,将IP地址和MAC地址设为ACCEPT,即加入白名单: iptables -A INPUT 阅读全文