gpt4 book ai didi

bind - dante-sever 无法通过 docker 容器中的接口(interface)名称绑定(bind) ip

转载 作者:行者123 更新时间:2023-12-01 16:23:58 32 4
gpt4 key购买 nike

我最近尝试了 docker,但 dante-server 似乎无法工作。

环境

操作系统:gentoo x86_64
docker 版本:

Client version: 1.1.0
Client API version: 1.13
Go version (client): go1.3
Git commit (client): 79812e3
Server version: 1.1.0
Server API version: 1.13
Go version (server): go1.3
Git commit (server): 79812000

用于定制镜像的DockerFile

From centos:centos6

RUN yum install -y curl

RUN rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
RUN rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt


RUN echo -e "[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/6/\$basearch/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/nginx.repo

RUN yum install -y nginx tinyproxy dante-server mysql-server

启动容器

sudo docker run -i \
--name="proxy" \
-p 14000:3128 \
-p 14001:4655 \
-v ${confdir}/tinyproxy.conf:/etc/tinyproxy.conf \
-v ${confdir}/dante-server.conf:/etc/sockd.conf \
-v ${dantelogdir}:/var/log/socks \
-v ${tinylogdir}:/var/log/tinyproxy \
devel/centos6 /bin/bash -c "tinyproxy -c /etc/tinyproxy.conf;sockd -f /etc/sockd.conf"

sockd 配置

internal: eth0 port = 4655
external: eth0

logoutput: /var/log/socks/sockd.log
socksmethod: none

user.privileged: root
user.notprivileged: root
user.libwrap: root

client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
clientmethod: none # match all idented users that also are in passwordfile
}

socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
socksmethod: none
}

当我单独测试时,tinyproxy 运行良好。 dante-server 通过了配置测试,但在启动过程中日志出现以下错误:

Aug 10 07:54:35 (1407653675.105641) sockd[12]: warning: bindinternal(): bind of address fe80::dc6f:d7ff:fe8f:fa59.46 55 (address #2/2) for server to listen on failed: Cannot assign requested address Aug 10 07:54:35 (1407653675.105650) sockd[12]: error: serverinit(): failed to bind internal addresses: Cannot assign requested address
Aug 10 07:54:35 (1407653675.105672) sockd[12]: alert: mother[1/1]: shutting down

错误似乎 dante-server 无法绑定(bind)到由接口(interface)名称 **eth0* 解析的 IP。有什么帮助吗?

最佳答案

使用“内部:0.0.0.0 端口 = 4655”代替“内部:eth0 端口 = 4655”

关于bind - dante-sever 无法通过 docker 容器中的接口(interface)名称绑定(bind) ip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25226531/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com