您的位置:首页 > 运维架构 > Linux

如何关闭Linux防火墙

2011-07-12 21:03 281 查看
首先以root身份登录
然后输入命令:

# service iptables save
# service iptables stop
# chkconfig iptables off

如果是IPV6:
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off

SUSE

chkconfig SuSEfirewall2_init off
chkconfig SuSEfirewall2_setup off

在Linux下怎么判断一个IP是不是被多个系统占有:
以root身份登录,运行命令 arping ip地址,查看返回的mac地址

Example:
>arping 9.37.119.75.
ARPING 9.37.119.75 from 9.37.119.137 eth0
Unicast reply from 9.37.119.75 [00:11:25:9D:79:9A] 0.630ms
Unicast reply from 9.37.119.75 [00:11:25:9D:79:9A] 0.601ms
Unicast reply from 9.37.119.75 [00:11:25:9D:79:9A] 0.609ms

arping是用于发送arp请求到一个相邻主机的工具;
arping使用arp数据包,通过ping命令检查设备上的硬件地址。

语法:
[root@ha01 ~]# arping
Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination
-f : quit on first reply
-q : be quiet
-b : keep broadcasting, don't go unicast
-D : duplicate address detection mode
-U : Unsolicited ARP mode, update your neighbours
-A : ARP answer mode, update your neighbours
-V : print version and exit
-c count : how many packets to send
-w timeout : how long to wait for a reply
-I device : which ethernet device to use (eth0)
-s source : source ip address
destination : ask for what ip address

该命令的各选项含义如下:
-f 表示在收到第一个响应包后就退出;
-q quiet output 不显示任何信息;
-b 用于发送以太网广播帧(FFFFFFFFFFFF)。arping一开始使用广播地址,在收到响应后就使用unicast地址。
-c count表示发送指定数量的 ARP 请求数据包后就停止。如果制定了deadline选项,则arping会等待相同数量的arp响应包,直到超时为止;
-d hostname 删除指定 hostname 的所有入口;
-w timeout设定一个超时时间,单位是秒。如果到了指定时间,arping 还没有完全收到响应则退出;
-V 显示版本信息
-H type设置和查询arp缓存时检查 type 类型的地址;
-a [hostname] 显示指定 hostname 的所有入口;
-s hostname hw_addr 手工加入 hostname 的地址映射;

如何判断两个RPM包是否相同:
针对这两个RPM包运行命令,然后比较结果

rpm -qipl rpm_name
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: