简体   繁体   English

让 Jenkins 访问 VPN 背后的 AWS 实例

[英]Giving Jenkins access to AWS instance behind a VPN

I need to trigger a Jenkins build that will access a Chef server installed on an EC2 instance which is behind a VPN.我需要触发一个 Jenkins 构建,该构建将访问安装在位于 VPN 后面的 EC2 实例上的 Chef 服务器。

Potentially the security group could be relaxed to allow the Jenkins server's IP, but I hope to avoid that.安全组可能会放宽以允许 Jenkins 服务器的 IP,但我希望避免这种情况。

Is there a way to connect Jenkins to a VPN while executing a build?有没有办法在执行构建时将 Jenkins 连接到 VPN?

A Google search of this yielded this plugin on github but in its Jenkins page there's no real information nor is it downloadable.对此的 Google 搜索在github上找到了这个插件,但在其Jenkins 页面中没有真实信息,也无法下载。

一种方法是让安全可靠的堡垒服务器充当VPC的接口,并仅允许您允许的请求访问隧道(使用SSH,VPN或其他方式)。

You should create a NAT gateway in the account where Jenkins is installed. 您应该在安装了Jenkins的帐户中创建NAT网关。 NAT Gateway will have Elastic IP and all the resources in this VPC (including Jenkins) will reach to Internet using this EIP. NAT网关将具有弹性IP,并且此VPC中的所有资源(包括Jenkins)都将使用此EIP到达Internet。 Then you configure your target security group to allow connections from this Elastic IP. 然后,将目标安全组配置为允许来自此弹性IP的连接。

create OpenVPN ec2 instance from aws marketplace and create ec2 instance for ur jenkin and add the security group of ur openvpn instance to jenkin instance .. so that once u connect your openvpn then only u access ur jenkin instance...从 aws 市场创建 OpenVPN ec2 实例并为您的 jenkin 创建 ec2 实例并将您的 openvpn 实例的安全组添加到 jenkin 实例..这样一旦您连接您的 openvpn 就只有您访问您的 jenkin 实例...

Note: Openvpn instance is not free of cost注意:Openvpn 实例不是免费的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM