在iptables服务开启的状态测试不会出现unknown key的错误

在iptables服务开启的状态测试不会出现unknown key的错误,我们尝试关闭
iptables .

[root@DT2MISPDB ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: nat filter [ OK ]
Unloading iptables modules: [ OK ]
[root@DT2MISPDB ~]#
[root@DT2MISPDB etc]# service iptables status
Firewall is stopped.



[root@DT2MISPDB etc]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 2097152
kernel.shmmax = 3221225472
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
error: "net.ipv4.ip_conntrack_max" is an unknown key
[root@DT2MISPDB etc]#

发现错误出现:
error: "net.ipv4.ip_conntrack_max" is an unknown key





使用modprobe载入ip_conntrack模块,lsmod查看模块已载入。

[root@DT2MISPDB etc]# modprobe ip_conntrack
[root@DT2MISPDB etc]# lsmod
Module Size Used by
ip_conntrack 53281 0



再次关闭iptables服务,查看
[root@DT2MISPDB etc]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
[root@DT2MISPDB etc]#

[root@DT2MISPDB etc]# lsmod
结果没有发现ip_conntrack 模组。




问题 :
1. Linux下加载及卸载模块是什么意思 ? 这里的模块都是指核心模块 ?
2. 加载 ip_conntrack 模块和 iptables 服务以及 通过service iptables start 有什么关系 ?  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值