标题:
《Linux网络编程》第二版运行第20章防火墙代码出错
[打印本页]
作者:
一见封候
时间:
2016-3-4 11:22
标题:
《Linux网络编程》第二版运行第20章防火墙代码出错
我用的系统:CentOS_5.11 内核: 2.6.18-408.e15
我下发“./sipfw -A INPUT -s 127.0.0.1 -p icmp -j DROP”命令后,为什么在目的ip地址会出现一个随机ip地址?“DROP 127.0.0.1 0 137.254.144.211 0 1”
有没大神懂的,告诉小弟一声,万分感谢!!
root@bogon 20]# cd module
[root@bogon module]# insmod sipfw_module.ko
[root@bogon module]# cd ..
[root@bogon 20]# cd app
[root@bogon app]# ./sipfw -A INPUT -s 127.0.0.1 -p icmp -j DROP
==>SIPFW_ParseCommand
==>SIPFW_ParseOpt
<==SIPFW_ParseOpt
==>SIPFW_ParseOpt
<==SIPFW_ParseOpt
==>SIPFW_ParseOpt
<==SIPFW_ParseOpt
==>SIPFW_ParseOpt
<==SIPFW_ParseOpt
<==SIPFW_ParseCommand
==>SIPFW_DisplayOpts
SIPFW_CMD_LIST is 2
command:APPEND
source IP:127.0.0.1
Dest IP:0.0.0.0
sport : 0
dport: 0
proto: 1
ifname:
<==SIPFW_DisplayOpts
==>SIPFW_NLCreate
<==SIPFW_NLCreate
==>SIPFW_NLSend
<==SIPFW_NLSend
==>SIPFW_NLRecv
<==SIPFW_NLRecv
information:SUCCESS
==>SIPFW_NLClose
<==SIPFW_NLClose
[root@bogon app]# ./sipfw -L
==>SIPFW_ParseCommand
<==SIPFW_ParseCommand
==>SIPFW_DisplayOpts
SIPFW_CMD_LIST is 3
command:LIST
source IP:0.0.0.0
Dest IP:0.0.0.0
sport : 0
dport: 0
proto: 4294967295
ifname:
<==SIPFW_DisplayOpts
==>SIPFW_NLCreate
<==SIPFW_NLCreate
==>SIPFW_NLSend
<==SIPFW_NLSend
==>SIPFW_NLRecv
<==SIPFW_NLRecv
==>SIPFW_NLRecvRuleList
==>SIPFW_NLRecv
<==SIPFW_NLRecv
CHAIN INPUT Rules
ACTION SOURCE SPORT DEST DPORT PROTO
DROP 127.0.0.1 0 137.254.144.211 0 1
<==SIPFW_NLRecvRuleList
==>SIPFW_NLClose
<==SIPFW_NLClose
[root@bogon app]#
作者:
gong123
时间:
2016-10-2 23:18
哥们,有《Linux网络编程》书籍的例程代码吗?我的邮箱
350817634@qq.com
,谢谢
欢迎光临 万卷图书 (http://wanjuanchina.net/)
Powered by Discuz! 7.0.0