论坛风格切换切换到宽版
  • 671阅读
  • 7回复

[问题求助][RedHat] linux as4的iptables的防ping问题 [复制链接]

上一主题 下一主题
离线bysoft.
 
发帖
2044
C币
-560003
威望
365
贡献值
5
银元
-2
铜钱
4527
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
请问如何实现在linux .as4中.可以以ping出去,但外面不可以ping入呢?命令是什么?           女人

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线wwwfu80com.
发帖
1976
C币
-235639
威望
352
贡献值
1
银元
0
铜钱
4319
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:[RedHat]
iptables -A OUTPUT -o eth0 -p icmp -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -i eth0 -p icmp --icmp-type echo-request -j DROP

红色的为你的外网网卡

发帖
2134
C币
-235037
威望
393
贡献值
1
银元
-5
铜钱
4821
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
Re:[RedHat]
非常感谢你~!

离线blueii.
发帖
1982
C币
-152858
威望
353
贡献值
1
银元
-2
铜钱
4430
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
Re:[RedHat]
开机执行echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

或者编辑/etc/sysctl.conf
添加:net.ipv4.icmp_echo_ignore_all = 1
保存退出后,执行sysctl -p

离线wing.
发帖
2050
C币
-60802
威望
371
贡献值
1
银元
-3
铜钱
4533
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-13
Re:[RedHat]
iptables 实现还是比较的容易的呀

发帖
1925
C币
-152776
威望
343
贡献值
1
银元
-2
铜钱
4341
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-13
Re:[RedHat]
4楼的方法也可以

离线modiyasi.
发帖
2086
C币
-235066
威望
392
贡献值
1
银元
-2
铜钱
4687
人人网人气币
0
只看该作者 6楼 发表于: 2010-04-13
Re:[RedHat]
其實兩種都可以

离线cqggff.
发帖
1839
C币
-194036
威望
313
贡献值
1
银元
-3
铜钱
4001
人人网人气币
0
只看该作者 7楼 发表于: 2010-04-13
Re:[RedHat]
帖子还没沉下去哦。我刚好研究着磁盘阵列这个问题卡住了,希望大家看到帮我分析一下,我安装raidtools老是不成功,我用的是linux AS4:
[root@localhost raidtools-1.00.3]# ./configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
[root@localhost raidtools-1.00.3]# make
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o raidstart.o raidstart.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o parser.o parser.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o raidlib.o raidlib.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o version.o version.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o raid_io.o raid_io.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o scsi.o scsi.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o reconfiguration.o reconfiguration.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o rrc_common.o rrc_common.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o rrc_raid0.o rrc_raid0.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o rrc_raid5.o rrc_raid5.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o rrc_single.o rrc_single.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o mkraid.o mkraid.c
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o detect_multipath.o detect_multipath.c
mkraid.c: In function `main':
mkraid.c:174: error: missing terminating " character
mkraid.c:175: error: `WARNING' undeclared (first use in this function)
mkraid.c:175: error: (Each undeclared identifier is reported only once
mkraid.c:175: error: for each function it appears in.)
mkraid.c:175: error: syntax error before '!' token
mkraid.c:178: error: missing terminating ' character
mkraid.c:184: error: missing terminating ' character
mkraid.c:193: error: missing terminating ' character
mkraid.c:199: error: missing terminating " character
make: *** [mkraid.o] Error 1
make: *** Waiting for unfinished jobs....
[root@localhost raidtools-1.00.3]#
[root@localhost raidtools-1.00.3]# make install
for N in all install_bin install_doc install_dev; do make $N; done
make[1]: Entering directory `/software/raidtools-1.00.3'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
gcc -o raidstart raidstart.o parser.o raidlib.o version.o raid_io.o scsi.o reconfiguration.o rrc_common.o rrc_raid0.o rrc_raid5.o rrc_single.o -Wl,-Bstatic -lpopt -Wl,-Bdynamic
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o mkraid.o mkraid.c
gcc -o detect_multipath detect_multipath.o parser.o raidlib.o version.o raid_io.o scsi.o reconfiguration.o rrc_common.o rrc_raid0.o rrc_raid5.o rrc_single.o -Wl,-Bstatic -lpopt -Wl,-Bdynamic
gcc -O2 -Wall -DMD_VERSION=\""raidtools-1.00.3"\" -c -o raidreconf.o raidreconf.c
mkraid.c: In function `main':
mkraid.c:174: error: missing terminating " character
mkraid.c:175: error: `WARNING' undeclared (first use in this function)
mkraid.c:175: error: (Each undeclared identifier is reported only once
mkraid.c:175: error: for each function it appears in.)
mkraid.c:175: error: syntax error before '!' token
mkraid.c:178: error: missing terminating ' character
mkraid.c:184: error: missing terminating ' character
mkraid.c:193: error: missing terminating ' character
mkraid.c:199: error: missing terminating " character
make[1]: *** [mkraid.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/software/raidtools-1.00.3'
make[1]: Entering directory `/software/raidtools-1.00.3'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
[ -d //sbin ] || mkdir -p //sbin
for n in raidstart mkraid detect_multipath raidreconf arytst lsraid; do \
    install -s -m755 $n //sbin/$n ;\
done
install: cannot stat `mkraid': No such file or directory
install: cannot stat `raidreconf': No such file or directory
install: cannot stat `arytst': No such file or directory
install: cannot stat `lsraid': No such file or directory
make[1]: *** [install_bin] Error 1
make[1]: Leaving directory `/software/raidtools-1.00.3'
make[1]: Entering directory `/software/raidtools-1.00.3'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
for i in raidstart.8 raidstop.8 raidrun.8 mkraid.8 raid0run.8 raidtab.5 raidadd.8 ckraid.8 raidreconf.8 lsraid.8; do \
    EXT=`echo $i | sed 's/.*\.//'` ;\
    [ -d //usr/share/man/man$EXT ] || \
        mkdir -p //usr/share/man/man$EXT; \
    install -m644 $i //usr/share/man/man$EXT/$i ;\
done
make[1]: Leaving directory `/software/raidtools-1.00.3'
make[1]: Entering directory `/software/raidtools-1.00.3'
make[1]: warning: -jN forced in submake: disabling jobserver mode.
[ -d /dev ] || mkdir -p /dev
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do \
        if [ ! -e /dev/md$i ]; then \
                mknod -m 0600 /dev/md$i b 9 $i; \
        fi; \
done
make[1]: Leaving directory `/software/raidtools-1.00.3'
[root@localhost raidtools-1.00.3]#

[ 本帖最后由 jkler 于 2009-5-11 00:05 编辑 ]
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个