Hey everyone! I'm working with two public EC2 instances on AWS and I have a networking question. I've set up a public EC2 instance with a web server running on port 443, but the client wants to implement IP whitelisting, which has unfortunately blocked our support team from accessing it.
To work around this, I have another public EC2 instance in the same VPC that runs an OpenVPN server. I've confirmed that the VPN connection, IP forwarding, and NAT masquerading are all functioning well, as I can ping and access the web server from both the OpenVPN EC2 and the VPN clients using their internal IPs.
Now, I want to access the web server's public FQDN over port 443 through the VPN. My concern is that the connection will hit the IP whitelist set on the security group and fail. What steps do I need to take to make this work? Should I set a specific host route, or is there another method? Any suggestions would be greatly appreciated!
2 Answers
To access your web server from the VPN, you should allow the public IP of your OpenVPN server in the security group of the web server instance. Additionally, configure your OpenVPN server to push the route to the web server's private IP. This way, your traffic will stay within the VPC, making it secure and avoiding issues with IP whitelisting.
Make sure the VPN client resolves the FQDN to the private IP of the web server. You can do this by pushing the DNS configuration in your OpenVPN settings, or alternatively, manually adding a static route.
Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux