听说用modprobe ip_tables就可以启动iptables了。但是用了这个命令以后,出现:
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/2.6.32-042stab116.1/modules.builtin.bin'
modprobe: FATAL: Module iptables not found in directory /lib/modules/2.6.32-042stab116.1现在糊涂了,到底会是iptables的错误还是modprobe的错误?该怎么解决?
另外还有其它问题,如:怎么启动iptables,怎么停止iptables?
分别尝试过以下命令:service iptables start
然后就报错,说没有iptables这个服务。我明明装了啊
iptables -LChain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:sshChain FORWARD (policy ACCEPT)
target prot opt source destination Chain OUTPUT (policy ACCEPT)
target prot opt source destination 求热心人士小帮一把。
modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/2.6.32-042stab116.1/modules.builtin.bin'
modprobe: FATAL: Module iptables not found in directory /lib/modules/2.6.32-042stab116.1现在糊涂了,到底会是iptables的错误还是modprobe的错误?该怎么解决?
另外还有其它问题,如:怎么启动iptables,怎么停止iptables?
分别尝试过以下命令:service iptables start
然后就报错,说没有iptables这个服务。我明明装了啊
iptables -LChain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:sshChain FORWARD (policy ACCEPT)
target prot opt source destination Chain OUTPUT (policy ACCEPT)
target prot opt source destination 求热心人士小帮一把。
解决方案 »
- msvcrt,libc之间的关系
- 修改了linux格式化工具mke2fs的库文件lib/initialize.c这个源文件,如何在makefile中添加包含路径,详细看帖子
- CENTOS 7防火墙
- -L. -lcrypto 中指定的动态库libcrypto.so中明明有函数tpcm_eckey_to_bin,为什么找不到呢?
- weblogic12C启动时候遇到的问题,求解
- superset集成echarts
- 求解,kali虚拟机不能上网
- 没有终端界面下linux如何获取键盘字符
- 虚拟机安装tools出现小问题求大神
- CentOS 7at的命令无法正确使用
- mount的mount error(5), Input/output error错误?
- 树莓派上实时视频传输需要怎么实现?
我试过 service iptables start
结果:Failed to start iptables.service: Unit iptables.service not found
我试过:/etc/init.d/iptables start
结果:bash: /etc/init.d/iptables: No such file or directory
我试过 service iptables start
结果:Failed to start iptables.service: Unit iptables.service not found
我试过:/etc/init.d/iptables start
结果:bash: /etc/init.d/iptables: No such file or directory
你安装iptables了吗?
我试过 service iptables start
结果:Failed to start iptables.service: Unit iptables.service not found
我试过:/etc/init.d/iptables start
结果:bash: /etc/init.d/iptables: No such file or directory
你安装iptables了吗?
肯定安装了啊。安没安装我还是知道的。
最近在做VPN server 要用到iptables 做nat转发,结果无论怎么做,都不能上外网啊。大侠要是有这方面的经验还望不吝赐教!!
谢谢了
root@localhost:/home/sam# iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source destination Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
SNAT all -- 192.168.1.0/24 0.0.0.0/0 to:23.83.225.181Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@localhost:/home/sam#
不能开机自动启动,但是不妨碍手工启动。
Looks like you have a mismatch between which kernel version modprobe is looking for 2.6.32-042stab104.1 vs the version you have (re)installed 3.19.0-30-generic.
use uname -r to dump your running kernel. It looks like you have some custom kernel installed - check your bootloader (probably grub) to see if it is hardcoded to some ancient kernel instead of the lastest installed kernel.
2.6.32 is old (ancient) enough that it probably doesn't use modules.builtin.bin - so you may have a mismatch in your modutils version vs your kernelhttps://lists.debian.org/debian-boot/2014/09/msg00880.html
modules.builtin is generated at kernel build time and can't be regenerated from the installed kernel or modules.
小弟英文实在是差!目前能掌握的英文基本上都是从羡剧里学的
看到kernel这个词我就怕了,小弟是新手,才接触linux,更不要提内核了这个系统是刚刚安装的,什么都没动过呢。另外今天又有新的问题,安装mysql,然后就启动,结果Error,说是遇到找不到mysql.sock文件,看错误日志吧,找了半天没到。我想可能是因为是正在安装,所以没来得及写日志就退出了。
我是apt-get install安装的,如果需要依赖的话,它自己应该能搞定。
只能看屏幕,看configure的记录,发现有很多文件夹没有crateing成功,再往前翻,发现locale:cannot set TC_某某某。于是看locales,cat出来结果是空文件,然后又cd /var/lib/locales,然后就提示 no such file.....我也是不知道怎么办了,想当然的apt-get install locale吧,结果还是么有想把我电脑上的locales文件夹scp过去吧,结果提示:这不是一个普通的文件(机器翻译过的)
我醉醉的,重装系统吧。。
联网之后,执行下面的命令就可以使firewald加载iptables
systemctl stop firewalld
system mask firewalld
yum install iptables-services
service iptables status
OK...
我也没有见过 modprobe iptables 这句。modprobe 其他 iptables 的模块就有。
你现在应该直接用就行。另外,看看
iptables -t nat -S
的输出。
sudo systemctl status firewalld。
查看后,看到active(running)就意味着防火墙打开了。2.启动防火墙打开防火墙的命令为:
sudo systemctl start firewalld。3.关闭防火墙如果想关闭防火墙,命令为:
sudo systemctl stop firewalld。
关闭后查看是否关闭成功,如果看到inactive(dead)就意味着防火墙关闭了。
(我也是从网上找的)