最近公司使用公有云+私有云架構形式,在青雲搭建了隧道和***服務,記錄下雲平臺搭建***的操作。
在服務器端,點開路由器設置,開啓***功能
下載linux版的.zip包
linux端
yum install open***
將控制檯下載的zip包中的配置文件放入 /etc/open*** 目錄中
設置配置文件XXX.conf
[root@i-3ean32r0 open***]# vim /etc/open***/***.conf client dev tun proto udp ## <udp> remote 121.201.8.210 1194 ## <your-router-eip> resolv-retry infinite nobind user root ## <nobody> group root ## <nogroup> persist-key persist-tun ca yunify-ca.crt cert rtr-7ym3ave6.crt ## <rtr-xxxxxxxx.crt> key rtr-7ym3ave6.key ## <rtr-xxxxxxxx.key> tls-auth rtr-7ym3ave6.takey 1 ## <rtr-xxxxxxxx.takey> cipher AES-256-CBC comp-lzo mssfix 1400
啓動服務
/etc/init.d/open*** start
可以看到多了個IP tun0
ifconfig eth0 Link encap:Ethernet HWaddr 52:54:A5:B6:CB:D5 inet addr:172.16.200.2 Bcast:172.16.200.255 Mask:255.255.255.0 inet6 addr: fe80::5054:a5ff:feb6:cbd5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:66239 errors:0 dropped:0 overruns:0 frame:0 TX packets:40703 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:82381317 (78.5 MiB) TX bytes:3857279 (3.6 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.255.1.10 P-t-P:10.255.1.9 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:252 (252.0 b) TX bytes:252 (252.0 b)
這時候可以正常ping通服務器端的ip,並進行連接