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 / 问题 / 404696
Accepted
Sergiks
Sergiks
Asked: 2012-07-05 02:41:04 +0800 CST2012-07-05 02:41:04 +0800 CST 2012-07-05 02:41:04 +0800 CST

识别切断某个端口的路由器

  • 772

有没有办法确定我和某些服务器之间的哪个特定路由器阻止了某个端口上的连接?

我在泰国的一家酒店,他们最近更改了设备的一些设置,现在我无法通过 SSH / 端口 22 访问我在欧洲和美国的任何服务器。更传统的端口,如 80 或 21 是开放的。

traceroute命令在中间显示每个特定的路由器。但是有没有办法识别过滤掉端口 22 的呢?

firewall routing networking network-protocols
  • 3 3 个回答
  • 3402 Views

3 个回答

  • Voted
  1. Best Answer
    grifferz
    2012-07-05T04:52:27+08:002012-07-05T04:52:27+08:00

    您可能会使用tcptraceroute它来查看它被阻止的位置:

    $ sudo tcptraceroute ruminant.bitfolk.com 22
    Selected device eth0, address 192.168.0.8, port 49071 for outgoing packets
    Tracing the path to ruminant.bitfolk.com (85.119.82.121) on TCP port 22 (ssh), 30 hops max
     1  192.168.0.7  0.978 ms  0.556 ms  0.697 ms
     2  192.168.1.1  1.587 ms  1.667 ms  1.681 ms
     3  no-dns-yet-62-3-84-19.zen.co.uk (62.3.84.19)  27.635 ms  26.925 ms  27.658 ms
     4  ge-2-1-0-121.cr2.th-lon.zen.net.uk (62.3.84.213)  28.592 ms  27.971 ms  27.649 ms
     5  linx-gw-a.jump.net.uk (195.66.224.34)  28.614 ms  29.028 ms  63.603 ms
     6  president.bitfolk.com (85.119.80.16)  28.606 ms  28.039 ms  28.657 ms
     7  ruminant.bitfolk.com (85.119.82.121) [open]  28.594 ms  29.030 ms  28.671 ms
    
    • 7
  2. Michael Teeman
    2012-07-05T05:01:22+08:002012-07-05T05:01:22+08:00

    你应该lft在 linux 或 cygwin 中使用。 lft将在特定的 TCP 或 UDP 端口上跟踪路由

    tee@tee:~$ sudo lft -T 4.2.2.2:22
    
    Tracing _______________________________________________
    
    LFT can't seem to round-trip.  Local packet filter in the way?
    
    TTL  LFT trace to vnsc-bak.sys.gtei.net (4.2.2.2):22/tcp
     1   49.109.61.1 0.4ms
     2   49.109.62.109 0.3ms
    **   [neglected] no reply packets received from TTL 3
     4   te0-1-0-7.ccr22.dfw01.atlas.cogentco.com (154.54.0.121) 0.7ms
     5   te0-0-0-0.ccr21.dfw01.atlas.cogentco.com (154.54.46.165) 0.7ms
    **   [neglected] no reply packets received from TTL 6
     7   te-3-2.car3.Dallas1.Level3.net (4.68.110.109) 0.9ms
     8   ae-41-90.car1.Dallas1.Level3.net (4.69.145.195) 1.0ms
    **   [22/tcp failed]  Try alternate options or use -V to see packets.
    
    LFT's trace took 6.33 seconds.  Resolution required 0.05 seconds.
    
    tee@tee:~$ 
    
    • 0
  3. Ladadadada
    2012-07-05T07:46:43+08:002012-07-05T07:46:43+08:00

    除了现有的答案之外,您还可以使用带有和标志的标准traceroute命令。此选项需要 root 权限。-P-p

    实际上,在 usingtcpdump确认这一点时,似乎您实际上必须使用-Tinstead of -P tcp. 我也尝试过,-P 6但这并没有导致traceroute使用 TCP。 -M tcp确实有效。

    $ sudo traceroute -T -p 22 79.125.0.4
    traceroute to 79.125.0.4 (79.125.0.4), 30 hops max, 60 byte packets
     1  rbx-5-m1.fr.eu (91.121.21.253)  0.708 ms  0.690 ms  0.583 ms
     2  rbx-1-6k.fr.eu (213.251.191.1)  0.951 ms *  0.765 ms
     3  rbx-g1-a9.fr.eu (94.23.122.106)  1.325 ms  1.485 ms  1.047 ms
     4  * * *
     5  195.66.237.175 (195.66.237.175)  5.894 ms  6.812 ms  4.083 ms
     6  178.236.3.57 (178.236.3.57)  16.493 ms  16.813 ms  16.393 ms
     7  178.236.3.155 (178.236.3.155)  16.600 ms  16.479 ms  16.422 ms
     8  178.236.0.75 (178.236.0.75)  16.337 ms  16.384 ms  16.333 ms
     9  178.236.0.58 (178.236.0.58)  17.786 ms  16.171 ms  16.957 ms
    10  ec2-79-125-0-4.eu-west-1.compute.amazonaws.com (79.125.0.4)  18.493 ms  18.672 ms  18.244 ms
    11  * * *
    12  * * *
    13  * * *
    
    • 0

相关问题

  • 用 D-LINK DFL-CPG310 防火墙替换 Cisco Pix 防火墙

  • MSMQ 防火墙端口

  • IP-KVM(在我的例子中是 ADDER Ipeps):轻松防火墙穿越

  • 远程连接 sql server 不工作,但如果防火墙禁用它呢?

  • 服务器 2003 R2 上的 Cisco VPN 客户端

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