# What does 0.0.0.0/0 means?

**URL:** <https://awshq.com/t/what-does-0-0-0-0-0-means/2883>\
**Category:** AWS Networking\
**Tags:** vpc\
**Created:** [January 14, 2017, 11:58am UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883 "2017-01-14T11:58:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![LastSnowLeopard](https://awshq.com/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@LastSnowLeopard](https://awshq.com/u/LastSnowLeopard)\
**Post date:** [January 14, 2017, 11:58am UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/1 "2017-01-14T11:58:13Z")

</div>

I thought it means all IP addresses. But then I encountered this in an AWS cert book:

> Create a subnet route table rule to send all non-local traffic (0.0.0.0/0) to the IGW

and later:

> You can scope the route to all destinations not explicitly known to the route table (0.0.0.0/0), or you can scope to a narrower range of IP addresses, […]

So does 0.0.0.0/0 mean all non-local IP addresses? Or is this the case only in some contexts such as AWS VPCs?

* * *

**Related discussions:**

- [Introducing Amazon CloudFront VPC origins: Enhanced security and streamlined operations for your applications](https://awshq.com/t/introducing-amazon-cloudfront-vpc-origins-enhanced-security-and-streamlined-operations-for-your-applications/19270)
- [Direct Connect failover time (to VPN)](https://awshq.com/t/direct-connect-failover-time-to-vpn/5948)
- [Secure Remote Access for AWS using OpenVPN - Sharing my thoughts](https://awshq.com/t/secure-remote-access-for-aws-using-openvpn-sharing-my-thoughts/20735)
- [Need help setting up architecture to reach a developer’s machine from an EC2 instance, via a peering connection and VPN Client](https://awshq.com/t/need-help-setting-up-architecture-to-reach-a-developers-machine-from-an-ec2-instance-via-a-peering-connection-and-vpn-client/21277)
- [Replaced our bastion hosts with Cloudflare Zero Trust + Transit Gateway — here’s the full setup](https://awshq.com/t/replaced-our-bastion-hosts-with-cloudflare-zero-trust-transit-gateway-heres-the-full-setup/21399)

---

<div class="post-metadata">

**Author:** ![rtwebb](https://awshq.com/letter_avatar_proxy/v4/letter/r/b77776/32.png) [@rtwebb](https://awshq.com/u/rtwebb)\
**Post date:** [January 14, 2017, 3:18pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/2 "2017-01-14T15:18:21Z")

</div>

I believe it would mean any destination IP address. It could be referring to a gateway of last resort.

---

<div class="post-metadata">

**Author:** ![rahomka](https://awshq.com/letter_avatar_proxy/v4/letter/r/dec6dc/32.png) [@rahomka](https://awshq.com/u/rahomka)\
**Post date:** [January 14, 2017, 3:30pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/3 "2017-01-14T15:30:27Z")

</div>

Local traffic means within the same subnet. If a destination is local it’s going to go directly to the destination. If it’s not local then it’s going to look at your route table to see where to go and you can create a single route 0.0.0.0/0, which means all IPs, send to the gateway.

Routing (in general) works off a route table which is a list of routes and the first matching route is what is used. For AWS there is a ‘local’ route that always come first.

---

<div class="post-metadata">

**Author:** ![reddithenry](https://awshq.com/letter_avatar_proxy/v4/letter/r/bc8723/32.png) [@reddithenry](https://awshq.com/u/reddithenry)\
**Post date:** [January 14, 2017, 3:41pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/4 "2017-01-14T15:41:40Z")

</div>

0.0.0.0/0 means, effectively, all-wild-card. So traffic going anywhere is re-directed to the Internet Gateway. Which is exactly what you want to access the internet 🙂

Be aware, on a security group, a 0.0.0.0/0 rule on the INCOMING traffic means anyone anywhere can connect via the specified port.

---

<div class="post-metadata">

**Author:** ![van7guard](https://awshq.com/letter_avatar_proxy/v4/letter/v/ea5d25/32.png) [@van7guard](https://awshq.com/u/van7guard)\
**Post date:** [January 14, 2017, 4:04pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/5 "2017-01-14T16:04:46Z")

</div>

0.0.0.0/0 represents all possible IP addresses.

In the context of the way routing tables get set up by default on AWS, 0.0.0.0/0 is effectively “all non local addresses”. This is because another route presumably exists in the routing table to route the VPC subnet to the local network on the VPC.

---

<div class="post-metadata">

**Author:** ![LiquidbestNA](https://awshq.com/letter_avatar_proxy/v4/letter/l/e274bd/32.png) [@LiquidbestNA](https://awshq.com/u/LiquidbestNA)\
**Post date:** [January 14, 2017, 6:38pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/6 "2017-01-14T18:38:39Z")

</div>

It is the default route outside the scope of the local subnet

---

<div class="post-metadata">

**Author:** ![m1m1n0](https://awshq.com/letter_avatar_proxy/v4/letter/m/e0b2c6/32.png) [@m1m1n0](https://awshq.com/u/m1m1n0)\
**Post date:** [January 14, 2017, 7:02pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/7 "2017-01-14T19:02:29Z")

</div>

0.0.0.0/0 is also known as default. You can call it “everything else” other than what is already specified in your routing table.

With IP routing there is a concept of “more specific route”. 0.0.0.0/0 is the most common network with all addresses from 0.0.0.0 to 255.255.255.255. 192.168.0.0/16 is inside it, but is more specific, covering addresses between 192.168.0.0 and 192.168.255.255. 192.168.1.0/24 would be even more specific to it covering only addresses 192.168.1.0-192.168.1.255. The traffic is routed according to the most specific route.

You can have nested networks and routes that all might lead to different destinations. You might decide to route 192.168.0.0/16 to your VPN gateway that leads towards your corporate network, at the same time have route 192.168.0.0/24 (or 192.168.100.0/24, which is also inside the big 192.168.0.0/16) that goes to an instance which then could do something for that traffic, then you can have a couple subnets 192.168.1.0/24 and 192.168.2.0/24 which will be routed locally. You can have VPC Peering set up towards another VPC which would be a route to 10.0.0.0/8. And on top of that. Everything else, everything that is outside of these destinations, is still inside 0.0.0.0/0.

---

<div class="post-metadata">

**Author:** ![scubadev](https://awshq.com/letter_avatar_proxy/v4/letter/s/5f8ce5/32.png) [@scubadev](https://awshq.com/u/scubadev)\
**Post date:** [January 14, 2017, 8:40pm UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/8 "2017-01-14T20:40:50Z")

</div>

> [@rahomka](#):
>
> Local traffic means within the same subnet. If a destination is local it’s going to go directly to the destination. If it’s not local then it’s going to look at your route table to see where to go and you can create a …

This is an excellent explanation. For more information, look up CIDR. In general 0.0.0.0/0 implies all IP addresses. For a very specific IP address, you would use 1.2.3.4/32. Any number can go after the /. For every 8 you go down, you expose another octet. So for example,

1.2.3.0/24 would mean any IP address that starts with 1.2.3

1.2.0.0/16 would mean any IP address that starts with 1.2.

1.0.0.0/8 would mean any IP address that starts with 1.

You even do halves, quarters, etc.

1.2.3.0/28 would mean any IP matching 1.2.3.[0-127]  
1.2.3.128/28 would mean any IP matching 1.2.3.[128-255]

---

<div class="post-metadata">

**Author:** ![LastSnowLeopard](https://awshq.com/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@LastSnowLeopard](https://awshq.com/u/LastSnowLeopard)\
**Post date:** [January 15, 2017, 12:34am UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/9 "2017-01-15T00:34:28Z")

</div>

> [@van7guard](#):
>
> 0.0.0.0/0 represents all possible IP addresses. In the context of the way routing tables get set up by default on AWS, 0.0.0.0/0 is effectively “all non local addresses”. This is because another route presumably exists …

Thanks! Now it is all clear.

---

<div class="post-metadata">

**Author:** ![LastSnowLeopard](https://awshq.com/letter_avatar_proxy/v4/letter/l/f17d59/32.png) [@LastSnowLeopard](https://awshq.com/u/LastSnowLeopard)\
**Post date:** [January 15, 2017, 12:34am UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/10 "2017-01-15T00:34:33Z")

</div>

> [@m1m1n0](#):
>
> 0.0.0.0/0 is also known as default. You can call it “everything else” other than what is already specified in your routing table. With IP routing there is a concept of “more specific route”. 0.0.0.0/0 is the most common …

Thanks! Now it is all clear.

---

<div class="post-metadata">

**Author:** ![reddithenry](https://awshq.com/letter_avatar_proxy/v4/letter/r/bc8723/32.png) [@reddithenry](https://awshq.com/u/reddithenry)\
**Post date:** [January 15, 2017, 11:11am UTC](https://awshq.com/t/what-does-0-0-0-0-0-means/2883/11 "2017-01-15T11:11:29Z")

</div>

IP addresses are [0-255].[0-255].[0-255].[0-255].

The /\* shows how many bits you fix from the left hand side.

So, for example, 192.168.0.0/16 means you accept/whatever traffic from 192.168.[0-255].[0-255].

/0 means no bits are fixed
