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 / 问题

全部问题(server)

Martin Hope
131
Asked: 2017-03-14 07:09:44 +0800 CST

为什么 CA 根证书都是 SHA-1 签名的(因为 SHA-1 已被弃用)?

  • 70

我了解 SSL 证书不能再使用 SHA-1 进行签名。然而,所有 CA 根证书都是 SHA-1 签名的(大部分)。这是否意味着不再受“你奶奶 SSL 商店”信任的相同算法适用于世界上最安全的证书?

我错过了什么吗?(密钥用法?密钥大小?)

ssl certificate-authority ssl-certificate
  • 6 个回答
  • 18640 Views
Martin Hope
Thomas V.
Asked: 2014-11-09 10:26:39 +0800 CST

Docker 容器无法解析 Ubuntu 14.04 桌面主机上的 DNS

  • 70

我在 Ubuntu 14.04 LTS 上遇到了我的 Docker 容器的问题。Docker 工作了两天,然后突然我失去了容器内的所有网络连接。下面的错误输出最初让我相信这是因为 apt-get 试图通过 IPv6 解析 DNS。

我在我的主机上禁用了 IPv6,但仍然删除了所有图像,提取了基础 ubuntu,但仍然遇到了问题。

我将 /etc/resolve.conf 名称服务器从本地 DNS 服务器更改为 Google 的公共 DNS 服务器(8.8.8.8 和 8.8.4.4),但仍然没有运气。我还在 /etc/default/docker 的 DOCKER_OPTS 中将 DNS 设置为 Google 并重新启动了 docker。

我也试过拉coreos,yum也无法解析DNS。

这很奇怪,因为虽然 DNS 不起作用,但当我 ping apt-get 无法解析的相同更新服务器时,我仍然得到响应。

我不在代理后面,我在一个非常标准的本地网络上,这个版本的 Ubuntu 是最新的和新鲜的(我两天前安装了更接近 docker)。

我已经通过关于 stackoverflow 和 github 问题的其他帖子彻底研究了这一点,但没有找到任何解决方案。我不知道如何解决这个问题,有人可以帮忙吗?

错误信息

➜  arthouse git:(docker) ✗ docker build --no-cache .
Sending build context to Docker daemon 51.03 MB
Sending build context to Docker daemon 
Step 0 : FROM ubuntu:14.04
 ---> 5506de2b643b
Step 1 : RUN apt-get update
 ---> Running in 845ae6abd1e0
Err http://archive.ubuntu.com trusty InRelease
Err http://archive.ubuntu.com trusty-updates InRelease
Err http://archive.ubuntu.com trusty-security InRelease   
Err http://archive.ubuntu.com trusty-proposed InRelease  
Err http://archive.ubuntu.com trusty Release.gpg
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
Err http://archive.ubuntu.com trusty-security Release.gpg
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
Err http://archive.ubuntu.com trusty-proposed Release.gpg
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease  
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease  
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-proposed/InRelease  
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-proposed/Release.gpg  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) [IP: 2001:67c:1360:8c01::19 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

容器 IFCONFIG/PING

➜  code  docker run -it ubuntu /bin/bash
root@7bc182bf87bb:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:04  
          inet addr:172.17.0.4  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:acff:fe11:4/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:738 (738.0 B)  TX bytes:648 (648.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@7bc182bf87bb:/# ping google.com
PING google.com (74.125.226.0) 56(84) bytes of data.
64 bytes from lga15s42-in-f0.1e100.net (74.125.226.0): icmp_seq=1 ttl=56 time=12.3 ms
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 12.367/12.367/12.367/0.000 ms
root@7bc182bf87bb:/# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=44 time=21.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=44 time=21.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=44 time=21.7 ms

此外,当我强制 IPv4 时,apt-get update 失败:

root@6d925cdf84ad:/# sudo apt-get update -o Acquire::ForceIPv4=true
Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://archive.ubuntu.com trusty-security InRelease

Err http://archive.ubuntu.com trusty-proposed InRelease

Err http://archive.ubuntu.com trusty Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.153 80]
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.153 80]
Err http://archive.ubuntu.com trusty-security Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.153 80]
Err http://archive.ubuntu.com trusty-proposed Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.153 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease  
ubuntu
  • 13 个回答
  • 193348 Views
Martin Hope
Stephen Cioffi
Asked: 2014-04-30 08:15:14 +0800 CST

阻止 IP 地址范围

  • 70

我正受到来自中国的黑客攻击的轰炸,这些黑客都拥有类似的 IP。

我将如何使用 116.10.191.* 等内容阻止 IP 范围?

我正在运行 Ubuntu Server 13.10。

我正在使用的当前行是:

sudo /sbin/iptables -A INPUT -s 116.10.191.207 -j DROP

这只能让我一次阻止每一个,但黑客每次尝试都会更改 IP。

ubuntu
  • 3 个回答
  • 140607 Views
Martin Hope
Miguel Ping
Asked: 2014-04-21 01:54:22 +0800 CST

如何为正在运行的容器指定主机名?

  • 70

我在正在运行的 docker 容器上设置主机名时遇到问题。我也无法理解如何在启动映像后指定主机名。

我从下载的图像启动了一个容器:

sudo docker run -p 8080:80 -p 2222:22 oskarhane/docker-wordpress-nginx-ss

但我忘了通过-h;指定主机名 既然容器正在运行,我如何指定主机名?

linux
  • 7 个回答
  • 162229 Views
Martin Hope
DisgruntledGoat
Asked: 2010-03-09 12:56:25 +0800 CST

Apache VirtualHost 中的重定向 URL?

  • 70

我有一个带有 Apache 的专用服务器,我在上面设置了一些 VirtualHosts。我已经设置了一个来处理 www 域以及非 www 域。

我的 www 的 VH .conf 文件:

<VirtualHost *>
  DocumentRoot /var/www/site
  ServerName www.example.com
  <Directory "/var/www/site">
    allow from all
  </Directory>
</VirtualHost>

有了这个.htaccess:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

有没有一种简单的方法可以将 www 重定向到非 www 版本?目前我将两个版本发送到相同的版本DocumentRoot并使用.htaccess,但我确信我必须能够在 VirtualHost 文件中做到这一点。

apache-2.2 virtualhost redirect mod-rewrite
  • 4 个回答
  • 270895 Views
Martin Hope
nafe
Asked: 2010-01-14 12:46:45 +0800 CST

mac os x 的 iptables 等价物

  • 71

我想将请求转发192.168.99.100:80到127.0.0.1:8000。这就是我在linux中使用的方法iptables:

iptables -t nat -A OUTPUT -p tcp --dport 80 -d 192.168.99.100 -j DNAT --to-destination 127.0.0.1:8000

我如何在 MacOS X 中做同样的事情?我尝试了一些ipfw命令组合,但没有取得多大成功:

ipfw add fwd 127.0.0.1,8000 tcp from any to 192.168.99.100 80

(对我来说,成功是将浏览器指向http://192.168.99.100并从我运行的开发服务器上获得响应localhost:8000)

mac-osx iptables ipfw
  • 7 个回答
  • 194585 Views
Martin Hope
Jeff Atwood
Asked: 2010-01-09 19:01:11 +0800 CST

Round-Robin DNS 对于负载平衡静态内容是否“足够好”?

  • 70

我们在http://sstatic.net的网站之间提供了一组共享的静态内容。不幸的是,这个内容目前根本没有负载平衡——它是从单个服务器提供的。如果该服务器有问题,所有依赖它的站点都会有效地关闭,因为共享资源是必不可少的共享 javascript 库和图像。

我们正在寻找方法来平衡此服务器上的静态内容,以避免单一服务器依赖。

我意识到循环 DNS 充其量只是一种低端(有些人甚至可能会说ghetto)解决方案,但我不禁想知道循环 DNS 是否是静态内容基本负载平衡的“足够好”的解决方案?

[dns] [load-balancing]标签中对此进行了一些讨论,并且我已经阅读了有关该主题的一些很棒的帖子。

我知道通过多个循环 A 记录进行 DNS 负载平衡的常见缺点:

  • DNS 记录通常没有心跳或故障检测,因此如果轮换中的给定服务器出现故障,则必须手动从 DNS 条目中删除其 A 记录
  • 生存时间 (TTL) 必须设置得非常低才能使其正常工作,因为 DNS 条目在整个 Internet 中被积极缓存
  • 客户端计算机负责查看有多个 A 记录并选择正确的记录

但是,对于我们的静态内容,“在我们研究和实施更好的替代方案时”形式的负载平衡,轮询 DNS 作为一个初学者是否足够好,总比没有好?还是在任何情况下,DNS 循环法都毫无价值?

domain-name-system load-balancing redundancy
  • 18 个回答
  • 68668 Views
Martin Hope
SJaguar13
Asked: 2009-11-07 10:36:58 +0800 CST

Apache 默认/包罗万象的虚拟主机?

  • 71

如果我有 3 个域,domain1.com、domain2.com 和 domain3.com,是否可以为未列出的域设置默认虚拟主机?例如,如果我有:

<VirtualHost 192.168.1.2 204.255.176.199>
DocumentRoot /www/docs/domain1
ServerName domain1
ServerAlias host
</VirtualHost>

<VirtualHost 192.168.1.2 204.255.176.199>
DocumentRoot /www/docs/domain2
ServerName domain2
ServerAlias host
</VirtualHost>

<VirtualHost 192.168.1.2 204.255.176.199>
DocumentRoot /www/docs/everythingelse
ServerName *
ServerAlias host
</VirtualHost>

如果您注册一个域并将其指向我的服务器,它将默认显示与 domain3 相同的所有内容。那可能吗?

apache-2.2 virtualhost
  • 10 个回答
  • 116973 Views
Martin Hope
sucuri
Asked: 2009-07-02 05:52:21 +0800 CST

你最喜欢的开源工具是什么?

  • 71
锁定。这个问题及其答案被锁定,因为这个问题离题但具有历史意义。它目前不接受新的答案或交互。

我相信现在每个系统管理员都习惯于开源。从 Apache 到 Firefox 或 Linux,每个人都至少会使用一点。

然而,大多数开源开发人员并不擅长营销,所以我知道有数百种非常好的工具,很少有人知道。

为了填补这一空白,请分享您在日常工作中使用的最喜欢的开源工具。

*我会在评论中发布我的。

open-source
  • 30 个回答
  • 7658 Views
Martin Hope
Jim McKeeth
Asked: 2009-05-01 14:14:37 +0800 CST

如何在 Windows 7 中挂载 CD/DVD ISO?

  • 71
锁定。这个问题及其答案被锁定,因为这个问题离题但具有历史意义。它目前不接受新的答案或交互。

Windows 7 是否具有安装 CD/DVD ISO 映像的本机支持?如果没有,在 Windows 7 64 位下最好的工具是什么?我正在寻找一种解决方案,允许安装 MSDN 下载而不将它们刻录到 CD/DVD。

iso windows-7 virtual-drive disk-image
  • 11 个回答
  • 214704 Views
上一页
下一页

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