How to: Linux flush or remove all iptables rules
Here is small script that does this. Debian or Ubuntu GNU/Linux does
not comes with any SYS V init script (located in /etc/init.d directory)
.
You create a script as follows and use it to stop or flush the iptables rules.
Please don't type rules at command prompt. Use the script to speed up work.
Procedure for Debian / Ubuntu Linux
A) Create /root/fw.stop /etc/init.d/fw.stop script using text editor such as vi:
#!/bin/sh
echo "Stopping firewall and allowing everyone..."
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
(B) Make sure you can execute the script:
# chmod +x /root/fw.stop
(C) You can run the script:
# /root/fw.stop
A note for RedHat and friends Linux user
Please note that RedHat enterprise Linux (RHEL) and Fedora / Centos
Linux comes with pre-installed script, which can be used to stop the
firewall:
#/etc/init.d/iptables stop
相关文档:
一、BootLoader的概念
BootLoader是系统加电启运行的第一段软件代码.回忆一下PC的体系结构我们可以知道,PC机中的引导加载程序由BIOS(其本质就是一段固件程序)和位于硬盘MBR中的引导程序一起组成。BIOS在完成硬件检测和资源分配后,将硬盘MBR中的引导程序读到系统的RAM中,然后将控制权交给引导程序。引 ......
系统重启后发现,Apache启动失败
报错如下:
# ./apachectl start
(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
查了下80
#netstat -Inp|grep 80
tcp 0 &n ......
iptables-save > ipt.v1.0
iptables-save > ipt.v1.1
iptables-restore < ipt.v1.0
cp /etc/sysconfig/iptables iptables.raw
service iptables save
ip伪装的脚本文件iptables_masquerade
#!/bin/bash
//设置linux系统允许ip包的转发
echo "1" > /proc/sys/net/ipv4/ip_forward
//加载实现 ......
里学习linux文件系统技巧,挂载U盘是否连接的技巧,文中以案例讲解。望能给大家带来小小的帮助。
Linux文件系统是异步的,也就是说写一个文件不是立刻保存到介质(硬盘,U盘等)中,而是存到缓冲区内,等积累到一定程度再一起保存到介质中。如果没有umount就非法拔出 U盘,程序是不知道的,fopen,fwrite等函数都依然返回正 ......