最近公司使用公有云+私有云架构形式,在×××搭建了隧道和×××服务,记录下云平台搭建×××的操作。
在服务器端,点开路由器设置,开启×××功能
下载linux版的.zip包
linux端
yum install open***
将控制台下载的zip包中的配置文件放入 /etc/open*** 目录中
设置配置文件XXX.conf
[root@i-3ean32r0 open***]# vim /etc/open***/×××.conf clientdev tunproto udp ##remote 121.201.8.210 1194 ## resolv-retry infinitenobinduser root ## group root ## persist-keypersist-tunca yunify-ca.crtcert rtr-7ym3ave6.crt ## key rtr-7ym3ave6.key ## tls-auth rtr-7ym3ave6.takey 1 ## cipher AES-256-CBCcomp-lzomssfix 1400
启动服务
/etc/init.d/open*** start
可以看到多了个IP tun0
ifconfigeth0 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,并进行连接