我一直试图将OpenVPN配置为侦听多个IPv4地址。我想要实现的是让OpenVPN监听所有可用的IP地址&它现在就是这样做的:
# netstat -tunlp
udp 0 0 0.0.0.0:1194 0.0.0.0:* 1955/openvpn但它只在主IP地址上工作,而在另一个IP上不起作用。我怀疑这与iptable有关。下面是我的OpenVPN配置的样子:
# cat /etc/openvpn/server.conf
port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem我使用以下bash脚本安装了OpenVPN:https://github.com/Nyr/openvpn-install/
如果你能帮我,或者告诉我什么可能是错的&如何解决它,我会非常感激的。
谢谢你萨阿德·伊斯梅尔
发布于 2016-06-13 16:14:58
根据https://serverfault.com/a/698480/315895,您需要openvpn的"multihome“选项,以确保它从正确的IP向客户端发送数据包(否则很有可能被防火墙丢弃)。
https://serverfault.com/questions/783679
复制相似问题