AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 126320
In Process
neezer
neezer
Asked: 2010-03-26 09:20:12 +0800 CST2010-03-26 09:20:12 +0800 CST 2010-03-26 09:20:12 +0800 CST

Ubuntu 服务器:使用 /etc/network/interfaces 中的 MODPROBE 选项联网失败...?

  • 772

出于某种原因(我还无法确定),昨天早上我们的网络服务器(运行 Ubuntu 8.04.2 LTS -- hardy)上的网络服务无法启动,我们的网站出现故障。

尝试重新启动时,我注意到以下错误消息:

* Reconfiguring network interfaces...
/etc/network/interfaces:6: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"
   ...fail!

文件中的第 6 行/etc/network/interfaces涉及一个 MODPROBE 命令,该命令(我相信)加载到ip_conntrack_ftp模块中,以便我可以在我的 FTP 服务器(vsftpd)上使用 PASV:(破坏 modprobe 命令在下面注释掉)

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# The loopback network interface
auto lo
iface lo inet loopback
#MODPROBE=/sbin/modprobe
#$MODPROBE ip_conntrack_ftp
pre-up iptables-restore < /etc/iptables.up.rules

# The primary network interface
# Uncomment this and configure after the system has booted for the first time
auto eth0
iface eth0 inet static
    address xxx.xxx.xxx.xxx
    netmask 255.255.255.0
    gateway xxx.xxx.xxx.1
    dns-nameservers xxx.xxx.xxx.4 xxx.xxx.xxx.5

我已经确认在/sbin调用中有一个文件modprobe。

就像我之前说的,这个设置一直到昨天早上都完美无缺(尽管我的老板说该网站实际上是在美国东部标准时间晚上 11 点关闭的)。

谁能解释一下(A)为什么会坏,(B)我怎样才能重新启用ip_conntrack_ftp模块?

ftp ubuntu networking modprobe
  • 3 3 个回答
  • 2393 Views

3 个回答

  • Voted
  1. user62491
    2011-12-13T13:27:53+08:002011-12-13T13:27:53+08:00

    任何人都可以阐明(A)为什么会破裂,

    我不认为你可以从/etc/networking/interfaces. 您可能需要使用该pre-up指令:

    从接口(5)手册页:

       pre-up command
              Run  command  before bringing the interface up.  If this command
              fails then ifup aborts, refraining from marking the interface as
              configured,  prints  an  error message, and exits with status 0.
              This behavior may change in the future.
    

    但是,最好添加模块的名称,/etc/modules以便在启动时加载它。(请注意,如果命令pre-up命令执行失败,您的界面将不会出现 - 即使其余配置非常好)。

    (B) 如何重新启用 ip_conntrack_ftp 模块?

    从modules(5)手册页:

       The  /etc/modules file contains the names of kernel modules that are to
       be loaded at boot time, one per line. Arguments can  be  given  in  the
       same line as the module name. Lines beginning with a ’#’ are ignored.
    
    • 1
  2. Martin G
    2010-09-11T10:48:07+08:002010-09-11T10:48:07+08:00

    您可以通过将其名称添加到 /etc/modules 来重新启用该模块。

    • 0
  3. Farhan
    2011-11-13T03:36:39+08:002011-11-13T03:36:39+08:00

    尝试运行命令:

    modprobe ip_conntrack_ftp

    如果它工作正常,这意味着模块正在正常加载。然后不是每次重新启动接口时都添加模块,而是将上述命令添加到 /etc/rc.local

    那么模块将一直保持加载到系统中。(相反,它会在网络服务启动时尝试加载自己)

    或者,为了测试,您可以在注释为“MODPROBE”的两行位置添加此命令“/sbin/modprobe ip_conntrack_ftp”,然后尝试它是否有效。

    • 0

相关问题

  • 为什么我的电脑休眠时 VPN 连接会中断?[关闭]

  • 有什么软件可以模拟局域网?

  • 保护新的 Ubuntu 服务器 [关闭]

  • 带宽利用工具?[关闭]

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve