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
相关文档:
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
//加载实现 ......
1)关闭防火墙
#service iptables stop<enter> \\关闭防火墙
#chkconfig iptables off<enter> \\关闭开机启动
2)IP地址的配置
①命令方式
#netconfig<enter> \\设置IP地址、子网掩码、网关、DNS
#vi /etc/sysconfig/network \\主机名
#hostname XXX \\设置主机名称
#exit ......
嵌入式Linux下彩色LCD驱动的设计与实现
摘要:本文介绍了如何在嵌入在开发彩色LCD显示驱动的方法,并对Linux中的显示驱动程序结构和框架作一介绍。
长期以来,在常见的掌上电脑(PDA)等小型手持式设备上,由于硬件条件等的限制,我们看到的显示器件通常是单色LCD,用户界面也非常简单,几乎看不到 PC ......
今天发现很多程序死在linux 服务进中
问个问题 今天发现很多程序死在linux 服务进中
已经死了好多天了。用crontab 都定在 凌晨0点跑。
想知道如何查看 服务器哪方面的资源太少导致进程死在里面?
ps -ef|grep load/script | awk '{print $2}' 把死进程的 ID 打印出来
......