I've configured OpenVPN server on Bastion instance in public subnet on AWS VPC. Right now, I have access private IP address of that instance with my OpenVpn client, but we want to access EC2 instances running in other private subnets in the VPC.
Here is my server.conf file:
port 1194 # TCP or UDP server? ;proto tcp proto udp ;dev tap dev tun ;dev-node MyTap ca /etc/openvpn/easy-rsa/pki/ca.crt cert /etc/openvpn/easy-rsa/pki/issued/server.crt key /etc/openvpn/easy-rsa/pki/private/server.key dh /etc/openvpn/easy-rsa/pki/dh.pem ;topology subnet server 10.8.0.0 255.255.255.0 ;client-config-dir ccd route 10.10.0.0 255.255.0.0 route 10.10.12.0 255.255.255.0 route 10.10.52.0 255.255.255.0 route 10.10.51.0 255.255.255.0 push "route 10.10.0.0 255.255.0.0" push "route 10.10.12.0 255.255.255.0" push "route 10.10.11.0 255.255.255.0" push "route 10.10.51.0 255.255.255.0" push "route 10.10.52.0 255.255.255.0" ;learn-address ./script ;push "redirect-gateway def1 bypass-dhcp" ;push "dhcp-option DNS 208.67.222.222" ;push "dhcp-option DNS 208.67.220.220" client-to-client #keepalive 10 120 tls-auth ta.key 0 # This file is secret cipher AES-256-CBC user nobody group nobody status openvpn-status.log verb 3 Since my networking knowledge is not on proper level, if anyone has an idea how to solve this, i would be very greatful.
Thanks