![尽管服务器桥与 DHCP 池一起使用,OpenVPN 客户端仍从外部服务器获取 DHCP 租约](https://linux22.com/image/745565/%E5%B0%BD%E7%AE%A1%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%A1%A5%E4%B8%8E%20DHCP%20%E6%B1%A0%E4%B8%80%E8%B5%B7%E4%BD%BF%E7%94%A8%EF%BC%8COpenVPN%20%E5%AE%A2%E6%88%B7%E7%AB%AF%E4%BB%8D%E4%BB%8E%E5%A4%96%E9%83%A8%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%8E%B7%E5%8F%96%20DHCP%20%E7%A7%9F%E7%BA%A6.png)
我有一台 OpenVPN 服务器和多个客户端。我的问题是,尽管我使用 server-bridge 指定了一个 DHCP 租约池,但我的客户端从该池获得租约,但最终(几分钟到几小时后)从 LAN 服务器端的 DHCP 服务器获得租约。为什么?
服务器配置:
port 1494
proto udp
dev tap0
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh.pem
tls-auth /etc/openvpn/keys/ta.key 0
mode server
tls-server
#server-bridge
server-bridge 192.168.1.128 255.255.255.0 192.168.1.80 192.168.1.90
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
cipher AES-128-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
mute 20
user nobody
group nobody
auth SHA256
push "route 192.168.1.1"
客户端配置:
client
dev tap0
proto udp
remote home.chrisseto.com 7825
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
cipher AES-128-CBC
auth SHA256
key-direction 1
remote-cert-tls server
verb 3
mute 20
comp-lzo
(内联关键部分被剪切)