AWS VPC route traffic to Client VPN connections - amazon-web-services

I have successfully configured an AWS Client VPN connection to a box running OpenVPN. I can access any devices on my VPC, which I've allowed access to.
Can I configure my VPC instances (an EC2 for example) to route traffic (SSH for example) to a client connected to the VPN?
Currently I cannot ssh to a client connected. I don't see any options to add a route to the Client VPN network. I've allowed all traffic in the Client VPN security group.
Is this a limitation of the Client VPN? If I want my VPN clients to be accessible from the VPC, will I need to configure a site to site connection?
Thanks a lot.

Per the recommendation of #James Dean, I configured a site to site between the devices which needed two way communication.

Related

Need for Port Forwarding VPN?

I'm wondering if I need port forwarding compatible Vpn given my tasks below:
Ill be connecting to aws services such as documentDB and RDS while travelling.
As a result, I plan on purchasing a dedicated IP VPN, so I can work while travelling, and add my VPN's static IP address to AWS to grant me access.
I'm working with a java spring boot backend. It connects to the documentDB and RDS and performs CRUD operations.
Does my VPN need to be port forwarding compatible?
I'm planning to purchase NordVPN with a dedicated IP, but might have to look into other VPNs port forwarding is required.
Some AWS services are VPC only, i.e. accessible only from the same VPC network. One of those services is DocumentDB, in order to connect directly from your laptop you'll have to create an ssh tunnel and port forward.
Having said that, you could have a bastion host in AWS configured with the right access, ssh (Linux) or RDP (Windows) to it and connect from that host.
The other option is https://aws.amazon.com/vpn/

Using a Raspberry Pi 4 as a Router between AWS VPC and in-house Network

We have a special on-premise router in our office, which connects to a VPN.
In this VPN there is a special IBM MQ server which we want to poll. The server provider
demands the usage of a special client for polling which only works on windows. Since the rest of our IT-infrastructure is #AWS, we want to have the windows machine, which is supposed to poll the queues, as an EC2 instance.
To enable the connection our idea was that we set up a Raspberry Pi in our office, which connects via OpenVPN to a Client VPN Endpoint. The traffic from the Raspi is getting routed into the subnet, where the EC2 instance lives. All the traffic that the Raspi is receiving on a specific port, gets forwarded to the in-house router.
Unfortunately, we are not able to send anything from the EC2 instance to the Raspi. Is it even possible to route traffic from a subnet back to a Client VPN Endpoint?
It's entirely possible; this problem is probably in your subnetting and routing.
Ensure that there is no overlap between the subnet CIDRs in your VPC, the VPN and the on-prem network.
Ensure the EC2 instance has an entry in its routing table that routes traffic for the on-prem network back via the client VPN endpoint. You can do this at VPC level by configuring the VPC's routing tables, so it applies to all instances in the VPC.
Ensure the Pi has IP forwarding enabled (echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward)
Ensure the Pi doesn't firewalling forwarded traffic (iptables-save or iptables -L -v)
Ensure the Pi has a route to get traffic up to the VPC, though it sounds like you have this in place already.

Check that VM on GCP is connecting to GCP VPN Gateway

How do I confirm that my VM connects to my GCP VPN Gateway? The two are already on the same network. I have tried pinging to the VPN Gateway IP from the vm but I cannot.
You would have to review and make sure that:
The VPN is active under Cloud VPN
Ensure that your GCP and on-prem firewall are allowing ingress/egress traffic between them
Depending on the type of VPN you choose, make sure that the IP address of the VM is shared to your on-prem via BPG, Route or Policy
If you see an issue with the VPN, you can review the VPN logs logs via logging (log viewer) and choose GCE Router. https://cloud.google.com/logging/docs/view/overview
If the issue is with the BGP/Route/Policy based, you would need to ensure your VPN IP is part of the shared range on both side (GCP and on-prem). https://cloud.google.com/network-connectivity/docs/vpn/concepts/overview#classic-vpn
If the issue is with Firewall, make sure that nothing is blocking your VM from communicating with your VPN IP range on GCP side and on your on-prem side. https://cloud.google.com/network-connectivity/docs/vpn/how-to/configuring-firewall-rules
Here is more troubleshooting you can review/try: https://cloud.google.com/network-connectivity/docs/vpn/support/troubleshooting

Is there a managed way to do P2S VPN in AWS?

I want to connect my (OSX) laptop to a VPC in AWS but I couldn't find a way to do this since I don't have a static IP.
Azure has managed P2S VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-about. Is there something like this in AWS?
You can stand up a virtual device (such as a CheckPoint firewall) in the VPC on an EC2 instance that has point to site VPN functionality. There are a number of AMI’s and quick starts for this available. You would also need a VPN client running on your laptop.
As an alternative, you can set up a bastion server and whitelist your IP. You can create a shell script that gets your IP and makes an AWS CLI call to update the security group with that value if it doesn’t exist. Then, log into the bastion and you’re in the VPC.
You can setup a client VPN under the VPC menu:
https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoints.html
It will require to have server cert, as well as client certificates or a link to managed AD for authentication.

How to setup a connection to VPN from AWS EC2 instance?

I'm running an application in EC2 which needs to connect to an external service running in a VPN (a connection to third party network). I have the IP address and auth details (pre-shared key) through which to connect, but don't know how exactly to setup the connection. Do I need to install a VPN Client or is there any other way through AWS Console?
If you can share the steps/tutorial to set it up, it would be really helpful.
I've configured Site-Site VPN and can see two tunnels under the VPN Connection (both are DOWN right now). I've shared the VPN config file with the third party and they have asked my source IP address to be used for both the tunnels. I'm assuming the source IP will be the public IP of NAT Gateway attached to my VPC (since the servers don't have public IP assigned to them).
You can use the Site to Site VPN(AWS hardware VPN) configuration from Amazon Virtual Private Cloud to your On-Premise Network which do not require a separate VPN Client. After the configuration, you can access the Server in the VPN from its IP range.
Following AWS User Guides will take you through to configure a VPN Connection. Basic configuration is straight forward and AWS will also provide automated scripts to setup configuration in your OnPremise network.
General Introduction to VPN Options Available in AWS: VPN Connections
Guide with Details in Setting up VPN: Adding a Hardware Virtual Private Gateway to Your VPC
Step by Step Guide for Configuration: Setting Up the VPN Connection
You can set up a VPN client in your EC2 instance but also can connect your VPC to the VPN server using:
VPN Connections.
Adding a Hardware Virtual Private Gateway to Your VPC