VPN server in VPC

0

Just a quick question:

Network A <---> DirectConnect <---> VPC1

If I set up an OpenVPN server on EC2 in VPC1, I can't use it to access network A because I can't route the traffic from/to the VPN network through the VPC - is that correct or am I missing something?

Thanks,
Marc

Marc
已提問 4 年前檢視次數 334 次
2 個答案
0
已接受的答案

Hi Marc,

Pat K from the Cohesive Networks team here.

To the best of my understanding you are correct - but you still have some options.

Lets pretend:
VPC - 10.20.20.0/22
Network Across Direct Connect - 192.168.0.0/16
OpenVPN network - 172.16.0.0/24

The direct connect will only route traffic to/from the VPC CIDR to the "across the direct connect" CIDR.
If you try to send packets to the on-premise from 172.16.0.0/24 they get dropped.

If you try to send packets from 192.168.0.0/16 to 172.16.0.0/24 they get dropped.

You will need to run a virtual gateway on the VPC side to some gateway on the other side of the direct connect. Tis gets you "up and over" the AWS VGW restrictions.

You could install strongswan/libreswan IPsec on your OpenVPN instance (if hand rolled and linux) and connect to an IPsec device across the direct connect. You would define a "tunnel" between the two sides of 192.168.0.0/16 - 172.16.0.0/24. Then your on-prem can route to your VPN.

OR if your OpenVPN server is Linux you can use GRE to make a tunnel (layer 2 tunnel) to a router/gateway across the direct connect and both sides set a static route pointing to the GRE tunnel. (note this tunnel is unencrypted)

OR use any of the appliance vendors in the AWS marketplace - depending on how many VPN credentials you need my company's free edition might meet your need.

Happy to explain the "roll your own" further if you need.

Cheers,

Pat K

已回答 4 年前
0

Hi Pat,

yes, I already thought about building a tunnel from the VPN server to an on premise system. I just wanted to make sure I'm not doing something completely stupid because of some oversight :)

Thanks a lot for your reply and for your kind offer!

Cheers,

Marc

Marc
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南