CentOS7下打通调试PC到K8s Pod之间网络的实践过程

2022-03-31 20:54:05 浏览数 (1)

CentOS7下打通调试PC到K8s Pod之间网络的实践过程

以CentOS7服务器为例

1、快速安装包直接解压安装

代码语言:javascript复制
tar -zxvf openvpn_install.tar.gz

(图片可点击放大查看)

并执行快速安装&脚本

代码语言:javascript复制
./openvpn_install_crack.sh 
#!/bin/bash

echo "   ___         _    ___  ___ ____   "
echo "  / __|___ _ _| |_ / _ / __|__  |  "
echo " | (__/ -_) '   _| (_) __  / /   "
echo "  ______|_||___|___/|___//_/    "
echo " OpenVPN Access Server With Unlimited License"
echo "=========================Install=============================="
yum install net-tools -y
rpm -ivh openvpn-as-2.5.2-CentOSrelease.x86_64.rpm
echo "=========================SetPassword=============================="
echo "SETUP AdminUI Login PASSWORD"

passwd openvpn

echo "=========================DONE=============================="
rm -rf /usr/local/openvpn_as/lib/python2.7/site-packages/pyovpn-2.0-py2.7.egg
chmod 755 ./pyovpn-2.0-py2.7.egg
cp -rf ./pyovpn-2.0-py2.7.egg /usr/local/openvpn_as/lib/python2.7/site-packages/
cd /usr/local/openvpn_as/bin
sed -i "s/from pyovpn.util.gcp/#from pyovpn.util.gcp/g" /usr/local/openvpn_as/bin/_ovpn-init
./ovpn-init


echo "=========================Status=============================="
systemctl status openvpnas.service 
chmod 755 /usr/local/openvpn_as/lib/python2.7/site-packages/pyovpn-2.0-py2.7.egg

(图片可点击放大查看)

说明:脚本来自github并做了部分修改

输入DELETE,并输入yes,然后一路回车即可

(图片可点击放大查看)

(图片可点击放大查看)

(图片可点击放大查看)

(图片可点击放大查看)

(图片可点击放大查看)

2、登录AdminUI管理界面

(图片可点击放大查看)

可以看到License已经为1024 devices(说明已经crack成功)

(图片可点击放大查看)

3、根据自身实际场景配置

1)指定可以访问的子网网段

2)关闭Internet traffic be routed through the *PN

3)Do not alter clients' DNS server settings

(图片可点击放大查看)

(图片可点击放大查看)

然后保存配置然后Update Running Server

(图片可点击放大查看)

4、创建用户并配置用户Profile

(图片可点击放大查看)

(图片可点击放大查看)

5、下载客户端,安装后连接

(图片可点击放大查看)

(图片可点击放大查看)

(图片可点击放大查看)

6、连通性测试

看能否访问相应的子网 10.200.0.0/16子网

(图片可点击放大查看)

(图片可点击放大查看)

(图片可点击放大查看)

如图所示,说明访问10.200.0.0/16段的业务OK

0 人点赞