Matt
Matt

Reputation: 26981

Setting CIDR/IP so anyone can access it from any IP?

How do you set a CIDR/IP so anyone can access it from anywhere? I'm trying to make my AWS RDS DB instance accessible from anywhere as my ISP doesn't give me a static IP. Everytime my IP changes I have to go change the security record.

Upvotes: 125

Views: 111902

Answers (5)

Saurabh Chandra Patel
Saurabh Chandra Patel

Reputation: 13634

For All IP ADD CIDR for DB Security Group:

If CIDR/IP :0.0.0.0/0 Not Working then Try

CIDR/IP: 1.1.1.1/32

Upvotes: 8

Alex Penna
Alex Penna

Reputation: 41

@Fikri reply is not correct.

if 0.0.0.0/0 does not work, try:

0.0.0.0/1 - from 0.0.0.0 to 127.255.255.255 addresses
128.0.0.0/1 - from 128.0.0.0 to 255.255.255.255 addresses

Upvotes: 4

russau
russau

Reputation: 9108

0.0.0.0/0 does the trick on the EC2 firewall settings

A CIDR defines a range of IP addresses. In the CIDR notation above, /0 is saying "every possible IP".

I like using http://cidr.xyz/ to visualize the range of addresses.

Upvotes: 229

Fikri
Fikri

Reputation: 11

If 0.0.0.0/0 doesn't work you can try:

0.0.0.0/1 
128.0.0.0/2
192.0.0.0/3
224.0.0.0/4

Upvotes: 0

Tails
Tails

Reputation: 3430

I'm not familiar with how one configures DB Security Groups, but if you allow access from IP's in this range, you'll allow access from any IP (...): 0.0.0.0/0 ...

From a security perspective, you should not do this. You should authorize the smallest possible group. For example, if only the last portion of your IP changes, e.g. your IP is always 1.2.3.*, then authorize 1.2.3.0/24.

For more information about CIDR notation, drop by Wikipedia: http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing

Upvotes: 13

Related Questions