歡迎您光臨本站 註冊首頁

linux客戶端可以連接,windows客戶端連接不上?

←手機掃碼閱讀     火星人 @ 2014-03-05 , reply:0

linux客戶端可以連接,windows客戶端連接不上?

非常奇怪的問題,找不到原因,不知道有人遇見過沒有?
用openvpn2.0.9搭建linux伺服器,已經配置完成,認證連接均可完成,從linux客戶端連接可以正常連接,ping通,但使用windows客戶端連接時,認證可以完成(出現Initialization Sequence Completed字樣),但是ping 不通,同時觀察tap網卡,發現大量數據傳出,平均每秒1M左右的數據,非常奇怪

我的server.conf配置如下:
port 4000

proto udp
dev tun

;dev-node MyTap

ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key  # This file should be kept secret
dh /etc/openvpn/keys/dh2048.pem

server 172.16.63.0 255.255.255.0

ifconfig-pool-persist ipp.txt

push "route 172.16.63.0 255.255.255.0"

management localhost 7505

;learn-address ./script
;push "redirect-gateway"
push "dhcp-option DNS 172.16.50.50"
;push "dhcp-option WINS 10.8.0.1"
#allow vpn Client access other vpnClient
client-to-client
##allow one user login multiuser
;duplicate-cn

##config openvpn user and password auth
plugin /etc/openvpn/openvpn-auth-pam.so openvpn
client-cert-not-required
username-as-common-name


;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC        # Blowfish (default)
;cipher AES-128-CBC   # AES
;cipher DES-EDE3-CBC  # Triple-DES

#comp-lzo
# clients we want to allow.
max-clients 100

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
user nobody
group nobody

# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status openvpn-status.log

# By default, log messages will go to the syslog (or
# on Windows, if running as a service, they will go to
# the "\Program Files\OpenVPN\log" directory).
# Use log or log-append to override this default.
# "log" will truncate the log file on OpenVPN startup,
# while "log-append" will append to it.  Use one
# or the other (but not both).
log         /var/log/openvpn.log
log-append  /var/log/openvpn.log

# Set the appropriate level of log
# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 3

# Silence repeating messages.  At most 20
# sequential messages of the same message
# category will be output to the log.
;mute 20
keepalive 10 120



client.conf配置如下:
client

# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.  On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap

# Are we connecting to a TCP or
# UDP server?  Use the same setting as
# on the server.
;proto tcp
proto udp

# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote 172.16.55.5 4000
;remote my-server-2 1194

# Choose a random host from the remote
# list for load-balancing.  Otherwise
# try hosts in the order specified.
;remote-random

# Keep trying indefinitely to resolve the
# host name of the OpenVPN server.  Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite

# Most clients don't need to bind to
# a specific local port number.
nobind

# Downgrade privileges after initialization (non-Windows only)
user nobody
group nobody

# Try to preserve some state across restarts.
persist-key
persist-tun

# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here.  See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy

# Wireless networks often produce a lot
# of duplicate packets.  Set this flag
# to silence duplicate packet warnings.
;mute-replay-warnings

# SSL/TLS parms.
# See the server config file for more
# description.  It's best to use
# a separate .crt/.key file pair
# for each client.  A single ca
# file can be used for all clients.
ca ca.crt
;cert client2.crt
;key client2.key
auth-user-pass
ns-cert-type server

# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1

# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x

# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
;comp-lzo

# Set log file verbosity.
verb 3

# Silence repeating messages
;mute 20
keepalive 10 120

補充一點,用ethereal抓windows客戶端上tap上的包看見,全部都是ip和icq的包,
《解決方案》

把連接不上時 server 和client的log都貼上來

[火星人 ] linux客戶端可以連接,windows客戶端連接不上?已經有753次圍觀

http://coctec.com/docs/service/show-post-44119.html