My networking knowledge is somewhat poor. I have created one VPC in AWS for which I have given CIRD block as "21.0.0.0/16". I have re-created network ACLs, security groups and subnets according one more VPC we have. All these settings in new and old VPC are exactly the same.
Then I created bastion server which has public IP address and tried to connect to it using Putty but Putty is failing with connection timed out
error.
I found following paragraph in AWS documentation :
We refer to private IP addresses as the IP addresses that are within the CIDR range of the VPC. Most VPC IP address ranges fall within the private (non-publicly routable) IP address ranges specified in RFC 1918; however, it is possible to use publicly routable CIDR blocks for your VPC. We currently do not support direct access to the Internet from publicly routable VPC CIDR blocks — if your VPC uses a publicly routable IP address range, you must set up Internet access through a virtual private gateway, a VPN connection, or AWS Direct Connect.
In RFC 1918
it is mentioned that private IP addresses block should start from 10.0.0.0 or from 172. or from 192.168.
I have used CIDR block in my VPC as 21.0.0.0/16
.
I would like to know if this CIDR block is allowed in AWS VPC or not.
21.0.0.0/16
range (which definitely does not seem to be the case looking at your post), I would suggest to go with private IP addresses block as mentioned in RFC 1918. Save your self some hardship. – slayedbylucifer