OpenVPN Windows Server 2008 R2 啟用 NAT

OpenVPN Windows Server 2008 R2 啟用 NAT

我想透過 VPN 重定向所有流量。

- 伺服器.ovpn:

port 1200
proto udp
dev tun
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\server.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\server.key"
dh "C:\\Program Files (x86)\\OpenVPN\\config\\dh2048.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth "C:\\Program Files (x86)\\OpenVPN\\config\\ta.key" 0 
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3

客戶端.ovpn:程式碼:

client
dev tun
proto udp
remote disaderp.eu 1200
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
  • 我將註冊表中的 IpEnableRuter 編輯為1.
  • 我為防火牆新增了規則
  • 是的,我可以 ping 我的伺服器

當我連接到此 VPN 時: - Ping/tracert 顯示:超出時間限制 - 我甚至無法 ping 到 10.8.0.1(VPN 伺服器)

答案1

我必須在我的伺服器上安裝 NAT。

我在 OpenVPN 上發布了一篇 wiki 文章:NatOverWINDOWS2008

相關內容