我了解 SSL 证书不能再使用 SHA-1 进行签名。然而,所有 CA 根证书都是 SHA-1 签名的(大部分)。这是否意味着不再受“你奶奶 SSL 商店”信任的相同算法适用于世界上最安全的证书?
我错过了什么吗?(密钥用法?密钥大小?)
我了解 SSL 证书不能再使用 SHA-1 进行签名。然而,所有 CA 根证书都是 SHA-1 签名的(大部分)。这是否意味着不再受“你奶奶 SSL 商店”信任的相同算法适用于世界上最安全的证书?
我错过了什么吗?(密钥用法?密钥大小?)
我在 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
我正受到来自中国的黑客攻击的轰炸,这些黑客都拥有类似的 IP。
我将如何使用 116.10.191.* 等内容阻止 IP 范围?
我正在运行 Ubuntu Server 13.10。
我正在使用的当前行是:
sudo /sbin/iptables -A INPUT -s 116.10.191.207 -j DROP
这只能让我一次阻止每一个,但黑客每次尝试都会更改 IP。
我在正在运行的 docker 容器上设置主机名时遇到问题。我也无法理解如何在启动映像后指定主机名。
我从下载的图像启动了一个容器:
sudo docker run -p 8080:80 -p 2222:22 oskarhane/docker-wordpress-nginx-ss
但我忘了通过-h
;指定主机名 既然容器正在运行,我如何指定主机名?
我有一个带有 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 文件中做到这一点。
我想将请求转发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
)
我们在http://sstatic.net的网站之间提供了一组共享的静态内容。不幸的是,这个内容目前根本没有负载平衡——它是从单个服务器提供的。如果该服务器有问题,所有依赖它的站点都会有效地关闭,因为共享资源是必不可少的共享 javascript 库和图像。
我们正在寻找方法来平衡此服务器上的静态内容,以避免单一服务器依赖。
我意识到循环 DNS 充其量只是一种低端(有些人甚至可能会说ghetto)解决方案,但我不禁想知道循环 DNS 是否是静态内容基本负载平衡的“足够好”的解决方案?
[dns] [load-balancing]标签中对此进行了一些讨论,并且我已经阅读了有关该主题的一些很棒的帖子。
我知道通过多个循环 A 记录进行 DNS 负载平衡的常见缺点:
但是,对于我们的静态内容,“在我们研究和实施更好的替代方案时”形式的负载平衡,轮询 DNS 作为一个初学者是否足够好,总比没有好?还是在任何情况下,DNS 循环法都毫无价值?
如果我有 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 到 Firefox 或 Linux,每个人都至少会使用一点。
然而,大多数开源开发人员并不擅长营销,所以我知道有数百种非常好的工具,很少有人知道。
为了填补这一空白,请分享您在日常工作中使用的最喜欢的开源工具。
*我会在评论中发布我的。
Windows 7 是否具有安装 CD/DVD ISO 映像的本机支持?如果没有,在 Windows 7 64 位下最好的工具是什么?我正在寻找一种解决方案,允许安装 MSDN 下载而不将它们刻录到 CD/DVD。