小编Dou*_*gui的帖子

无法在 VPN 上的容器中访问互联网

当 VPN 在我的主机上启动时,我无法在容器中执行 ping 操作。

我尝试这样做:

docker run adiazmor/docker-ubuntu-with-ping ping 8.8.8.8
Run Code Online (Sandbox Code Playgroud)

VPN 启动时失败,但这有效:

docker run --net=host adiazmor/docker-ubuntu-with-ping ping 8.8.8.8
Run Code Online (Sandbox Code Playgroud)

我不能总是有--net=host选项,因为我们不能links在 docker-compose 中使用。

我使用 IKE 来启动我的 VPN。这是 VPN 的配置(没有可见数据):

n:version:4
n:network-ike-port:500
n:network-mtu-size:1380
n:client-addr-auto:1
n:network-natt-port:4500
n:network-natt-rate:10
n:network-frag-size:540
n:network-dpd-enable:1
n:client-banner-enable:1
n:network-notify-enable:1
n:client-dns-used:1
n:client-dns-auto:0
n:client-dns-suffix-auto:1
n:client-splitdns-used:1
n:client-splitdns-auto:1
n:client-wins-used:1
n:client-wins-auto:1
n:phase1-dhgroup:2
n:phase1-keylen:256
n:phase1-life-secs:86400
n:phase1-life-kbytes:0
n:vendor-chkpt-enable:0
n:phase2-keylen:256
n:phase2-life-secs:28800
n:phase2-life-kbytes:0
n:policy-nailed:0
n:policy-list-auto:0
b:auth-mutual-psk:----
n:phase2-pfsgroup:-1
s:network-host:[network-host-ip]
s:client-auto-mode:pull
s:client-iface:virtual
s:network-natt-mode:enable
s:network-frag-mode:enable
s:client-dns-addr:8.8.8.8,8.8.4.4
s:auth-method:mutual-psk-xauth
s:ident-client-type:address
s:ident-server-type:any
s:phase1-exchange:main
s:phase1-cipher:aes
s:phase1-hash:sha1
s:phase2-transform:esp-aes
s:phase2-hmac:sha1
s:ipcomp-transform:disabled
s:policy-level:auto
s:policy-list-include:0.0.0.0 / 0.0.0.0 …
Run Code Online (Sandbox Code Playgroud)

vpn docker

7
推荐指数
1
解决办法
7842
查看次数

无法使 VirtualHost 使用 ipv6

我有一个由 apache 服务的网站。它适用于 IPv4,但不适用于 IPv6。我有一个 500 错误。

这是我的 ports.conf 文件:

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80
NameVirtualHost *:80

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>
Run Code Online (Sandbox Code Playgroud)

还有我的虚拟主机:

<VirtualHost *:80 [::]:80>
DocumentRoot "/var/www/html/mysite.ca/www.mysite.ca"
ServerName mysite.ca
<Directory "/var/www/html/mysite.ca/www.mysite.ca">
allow from all
Options +Indexes
</Directory>
ServerAlias www.mysite.ca
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

当我这样做时netstat-tlnpt,我有这个:

Active Internet connections (only servers)
Proto Recv-Q Send-Q …
Run Code Online (Sandbox Code Playgroud)

ipv6 apache-2.2

3
推荐指数
1
解决办法
2188
查看次数

标签 统计

apache-2.2 ×1

docker ×1

ipv6 ×1

vpn ×1