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 / 问题 / 433318
Accepted
Mike Pennington
Mike Pennington
Asked: 2012-09-30 13:00:47 +0800 CST2012-09-30 13:00:47 +0800 CST 2012-09-30 13:00:47 +0800 CST

CentOS tftp 服务器坏了

  • 772

我试图tftpd从xinetdCentOS 6 上运行;但是,我只能从本地主机进行 tftp。

我有一个文件,/opt/tftpboot/fw.test.conf如果我tftp到本地主机,我可以检索它:

[mpenning@localhost ~]$ tftp localhost
tftp> get fw.test.conf
tftp> quit
[mpenning@localhost ~]$ ls
fw.test.conf
[mpenning@localhost ~]$

tftp但是,如果我在eth1这个服务器上(地址eth1是172.16.1.4),我无法接收到这个文件。

[mpenning@localhost ~]$ sudo tshark -i eth1 udp and host 172.16.1.5
Running as user "root" and group "root". This could be dangerous.
Capturing on eth1
  0.000000   172.16.1.5 -> 172.16.1.4   TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000
  5.000133   172.16.1.5 -> 172.16.1.4   TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000
 10.000184   172.16.1.5 -> 172.16.1.4   TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000
 15.000297   172.16.1.5 -> 172.16.1.4   TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000
 20.000331   172.16.1.5 -> 172.16.1.4   TFTP Read Request, File: fw.test.conf\000, Transfer type: netascii\000
^C5 packets captured
[mpenning@localhost ~]$

我有以下 xinetd 配置:

[root@localhost mpenning]# cat /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /opt/tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
[root@localhost mpenning]#
linux
  • 2 2 个回答
  • 1329 Views

2 个回答

  • Voted
  1. Best Answer
    mgorven
    2012-09-30T13:42:12+08:002012-09-30T13:42:12+08:00

    在生产环境中,您可能希望专门允许 TFTP 通过防火墙。这可以通过运行system-config-firewall-tui、自定义防火墙并选择“TFTP”服务来完成。

    • 2
  2. Mike Pennington
    2012-09-30T13:05:22+08:002012-09-30T13:05:22+08:00

    CentOS 默认阻止以太网接口上的入站 UDP tftp 请求iptables...禁用该iptables服务解决了问题(这是一台实验室机器,所以禁用iptables是可以的)。

    [root@localhost mpenning]# chkconfig iptables off
    [root@localhost mpenning]# /etc/init.d/iptables stop
    [root@localhost mpenning]# 
    
    • 0

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

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

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

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

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

    • 9 个回答
  • Marko Smith

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

    • 3 个回答
  • Marko Smith

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

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +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