易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

linux下Apache启动失败的一些体会

系统重启后发现,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 ......

在Linux下解压windows下的rar文件

linux下默认只能解压zip压缩文件,而rar文件默认没有解压支持的工具,这里提供一个简单的方式,安装rar工具,支持linux下解压rar文件。
1:首先下载rar解压工具,这里用 rarlinux-3.6.b6.tar.gz,给出一个网友提供的版本下载地址:
http://blogimg.chinaunix.net/blog/upfile2/080226173046.gz
2:接下来执行如下操作
t ......

【Linux桌面应用】sudo的用法及配置

sudo是linux下常用的允许普通用户使用超级用户权限的工具。
它的主要配置文件是sudoers,linux下通常在/etc目录下,如果是solaris,缺省不装sudo的,编译安装后通常在安装目录的 etc目录下,不过不管sudoers文件在哪儿,sudo都提供了一个编辑该文件的命令:visudo来对该文件进行修改。强烈推荐使用该命令修改 sudoers,因为 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号