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
相关文档:
http://www.mcublog.com/more.asp?name=sharkdn&id=8810
=======================================
好些时候,我们需要一个只要一张软盘就能启动Linux 的系统,比如说做路由器。但是我们该怎样做呢? 也就是说我们要把Kernel和FileSystem都做在一张3.5'的盘上。我们先把FileSystem 分解成如下几个部分吧。
1. /b ......
和我们讨论的主题越来越近了。“男怕入错行,女怕嫁错郎”,我对这句话的体会越来越深刻了。最近有个民生银行的老总和我探讨了这个问题,毫无疑问,在银行这个行业肯定比一般的行业挣钱。于是,自然切到我们的话题:Linux这个行业怎么样?挣钱吗?以后开源了我还有饭吃吗?最近,我拿到了一份Linux的职业报告。调查 ......
Linux内核是作为Monolithic architecture (单内核体系结构) 而实现的,为了获得 Microkernel architecture (微内核体系结构) 带来的可扩展性和可维护性,Linux 引入了模块 (module) 机制,(比较准确的说法是 Loadable Kernel Module, 可装载内核模块),藉此来保证内核的紧凑性和Linux本身固有的单一体系结构的优点— ......
1)关闭防火墙
#service iptables stop<enter> \\关闭防火墙
#chkconfig iptables off<enter> \\关闭开机启动
2)IP地址的配置
①命令方式
#netconfig<enter> \\设置IP地址、子网掩码、网关、DNS
#vi /etc/sysconfig/network \\主机名
#hostname XXX \\设置主机名称
#exit ......