为了方便,我用VB重写了OpenVPN客户端,实际上就是gui版的OpenVPN,加上了一些检测机制,用于我和朋友们之间联机对战和资料共享,并重新命名为WolfLAN(单击下载客户端)。
由于OpenVPN拨入服务与内网接口同在一个桥里,因此拨入后可以直接通过DHCP获得内网IP,并且与本地LAN在同一个广播域里。目前经过测试,cs,魔兽,红警(IPX),星际,三角洲,暗黑,极品飞车,实况足球都全都成功联机。
Ros脚本:
[wolf@router_ros_330_wolf] /interface ovpn-server> export
# jun/10/2010 21:27:01 by RouterOS 3.30
# software id = QXLB-EYHG
#
/interface ovpn-server server
set auth=sha1 certificate=cert_wolf cipher=aes128 default-profile=ovpn_server
enabled=yes keepalive-timeout=60 mac-address=FE:36:F9:7F:32:0A max-mtu=\
1500 mode=ethernet netmask=24 port=1194 require-client-certificate=no
[wolf@router_ros_330_wolf] /interface ovpn-server>
[wolf@router_ros_330_wolf] /ppp profile> export
/ppp profile
add bridge=LAN change-tcp-mss=no comment="" dns-server=192.168.27.254 local-address=\
pool_master name=ovpn_server only-one=no rate-limit=512k/512k remote-address=\
pool_master use-compression=yes use-encryption=required use-vj-compression=yes \
wins-server=192.168.27.250
[wolf@router_ros_330_wolf] /ppp profile>
客户端代码:
client
dev tap
proto tcp
remote wolf.awolf.net 1194
ca ca.crt
keepalive 10 120
cipher AES-256-CBC
auth SHA1
auth-user-pass
verb 5
成功应用的ros版本为3.30 L6
需要ros 3.30 L6 的请看这里 《RouterOS 3.20 算号器 新版本 10分钟内算出指定id》
WolfLAN源码:http://www.awolf.net/content/vb/wolflan-source.html