3. OpenVPN Client Setting:
OpenVPN支持Muti-platform, Mac下可使用TunnelBlick或Viscosity進行連線,而Windows下用OpenVPN GUI就可以,請自行download相關軟件。小弟己加入注釋,參數如下:- # Client Side conf:
- client # Set OpenVPN major mode
- dev tun0 # TUN/TAP virtual network device
- proto udp # Setup the protocol (server)
- comp-lzo # Use fast LZO compression
- verb 3 # Set output verbosity to n
- remote myvpnaddress.org 1234 # remote address, port number
- resolv-retry infinite # Keep trying indefinitely to resolve the host name of the OpenVPN server
- nobind # Most clients don't need to bind to a specific local port number.
- persist-key # Try to preserve some state across restarts.
- persist-tun # Try to preserve some state across restarts.
- ns-cert-type server # you will need to generate, your server certificates with the nsCertType field set to "server"
- float # For a routed OpenVPN, the "float" option is necessary
- # Certificate Located:
- ca ca.crt # Certificate authority (CA) file
- cert client1.crt # Client1 signed certificate
- key client1.key # Client1 private key
- ;tls-auth ta.key 1 # If a tls-auth key is used on the server, every client also have the key
複製代碼 >> save as
Macintosh - config.conf
Windows - config.ovpn
留意的是tls-auth這個參數,如server side設定為0, client side應設定為1,
最後使用相關軟件連線,而OpenVPN是支持Muti-Platform,Macintsoh下可使用Viscosity/TunnelBlick, 而Windows下用OpenVPN GUI就可以了,以下是關的設定:
Macintosh:
1. Viscosity:
a. 安裝及開啟後在Status Bar上會有TunnelBlick的icon出現
b. 開啟 Viscosity > Preferences > + > Import Connection
c. Find config.conf
d. Import後點入設定檔,到Certificates > Authentication
e. Type:選SSl/TLS Client,把在Linux產生的證書放進去
f. 如發現在Advanced裡有些參數沒加進去,請自行加入
>> Connect
2. Tunnel Blick:
a. 安裝及開啟後在Status Bar上會有TunnelBlick的icon出現
b. TunnelBlick > Detail > Edit configuration
c. 把剛才的參數復製進去 > Save
d. 把client*.key, client*.csr和ca.csr都放到
> ~/Library/openvpn/ 裡
>> Connect
Windows
3. Windows OpenVPN GUI:
a. 和Macintosh一樣安裝後,開機後System Tray有個OpenVPN Icon (如想手動開動自行到msconfig關閉)
b. 把client*.key, client*.csr和ca.csr, config.ovpn都放到 > Program File > OpenVPN > Config 裡
b. OpenVPN GUI > Client* >> Connect
[ 本帖最後由 ToRoGene 於 2009-12-16 02:11 編輯 ] |