分类
未分类

Debian 重启后iptables规则丢失

将当前iptables规则保存

mkdir /etc/sysconfig
iptables-save > /etc/sysconfig/iptables

创建开机自启脚本

cat > /etc/network/if-pre-up.d/iptables <<-EOF #!/bin/bash /sbin/iptables-restore < /etc/sysconfig/iptables EOF

赋权

chmod +x  /etc/network/if-pre-up.d/iptables
分类
未分类

Linxu彻底清除history

debian/ubuntu清理history

>~/.bash_history

history -c

centos 清理history

echo > .bash_history

history -c