我需要使用OpenVPN连接公司内网,我安装之后客户端可以显示连接成功,但是只能访问OpenVPN服务端所在的Ubuntu虚拟机,内网其他虚拟机都连接不上,试了很多方法都解决不了,请问如何解决这个问题,服务端和客户端的配置如下:
服务器:
port 1110
proto tcp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh2048.pem
server 10.0.8.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "route 10.0.8.0 255.255.255.0"
push "route 10.10.10.0 255.255.255.0"
duplicate-cn
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 100
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
auth-user-pass-verify /etc/openvpn/checkpsw.sh via-env
username-as-common-name
script-security 3
客户:
client
dev tun
proto tcp
remote 147.153.37.160 1110
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
cipher AES-256-CBC
comp-lzo
verb 3
auth-user-pass pass.txt
Iptables:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:1110 /* openvpn */
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 10.6.0.0/24 anywhere
ACCEPT all -- anywhere 10.6.0.0/24
ACCEPT all -- 10.0.8.0/24 anywhere
ACCEPT all -- anywhere 10.0.8.0/24
Chain OUTPUT (policy ACCEPT)
target prot opt source destination