在安裝完 OpenVPN 2.0後作以下設定:
1:openvpn --genkey --secret static.key
2: 將 static.key 放於 /etc/openvpn/
3:設定/etc/openvpn/server.conf 如下:
dev tun
ifconfig 10.8.0.1 10.8.0.2
secret static.key
設定完成後執行 :/etc/init.d/openvpn start
出現Starting virtual private network daemon: FAILED-> server.
查看 /var/log/syslog,相關訊息習如下:
- OpenVPN 2.0 i386-pc-linux [SSL] [LZO] [EPOLL] built on May 28 2005
IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
WARNING: file '/etc/openvpn/static.key' is group or others accessible
Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Cannot allocate TUN/TAP dev dynamically
Exiting。
註:DEBIAN (sarge) kernel 2.4.27-2-386
我參考的資料:
http://moto.debian.org.tw/viewtopic.php?t=6366&highlight=vpn
http://wiki.debian.org.tw/index.php/OpenVPN