| 本帖最後由 gfx86674 於 2018-2-9 14:34 編輯 
 ROS提供隧道bridge功能,
 可以與OVPN的ethernet模式進行Layer2隧道連接,類似於Eoip-Tunnel
 
  複製代碼Office1 配置:
#建立bridge1 ,並橋接與之的端口(ether2)
/interface bridge add name=bridge1 protocol-mode=rstp
/interface bridge port add bridge=bridge1 interface=ether2
#建立屬於ethernet mode的profile(ovpn-bridging) 與帳密
/ppp profile add name=ovpn-bridging bridge=bridge1 use-encryption=yes
/ppp secret add profile=ovpn-bridging name=123 password=123 local-address=172.16.0.0 remote-address=172.16.0.1
/interface ovpn-server server
set auth=sha1 certificate=cert1 port=1194 cipher=blowfish128 default-profile=default mode=ethernet enabled=yes netmask=24
#啟用ovpn-server,並將mode切換至ethernet
設置完成後,當client與server連接,複製代碼Office2 配置:
/interface bridge add name=bridge1 protocol-mode=rstp
/interface bridge port add bridge=bridge1 interface=ether2
#與ovpn-server雷同
/ppp profile add name=ovpn-bridging bridge=bridge1 use-encryption=yes
#profile與ovpn-server雷同,方可回應橋接
/interface ovpn-client
add auth=sha1 certificate=cert1 port=1194 connect-to=123.123.123.123 name=ovpn-out1 mode=ethernet profile=ovpn-bridging user=123 password=123
#對Office1(123.123.123.123)進行ovpn撥號,mode切換至ethernet
在bridge的port裡可以看到123帳號的連接在bridge port被自動添加
 
  |