I have a server which responds differently to requests from the general internet as opposed to the intranet. For IPv4 I can simply check if the address begins with 192.168. This works for my needs. What is the equivalent for IPv6?
Asked
Active
Viewed 1.2k times
2 Answers
10
First of all "intranet" is not limited to 192.168. There are 3 private networks defined in RFC-1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
In IPv6, it is called a Unique local address: http://en.wikipedia.org/wiki/Unique_local_address and covered in RFC-4193 -- all addresses matching FC00::/7. Basically, you should be able to search for IPv6 addresses starting with fc or fd.
bmhkim
- 142
- 5
user996142
- 1,493
- 12
- 20
-
1For those who are curious, the RFCs in question can be found at [RFC 1918](https://tools.ietf.org/html/rfc1918) and [RFC 4193](https://tools.ietf.org/html/rfc4193) respectively. See also [RFC 6761](https://tools.ietf.org/html/rfc6761) for reserved DNS zones ("domain names"). – user May 21 '15 at 20:22
-
1Also, it's worth keeping in mind that RFC 4193 mandates bit 8 of the IPv6 address to be set to 1 (called the "L" bit). Thus, only addresses falling into FD00::/8 are defined by RFC 4193, although it allows for extending into FC00::/8 in the future by allowing for later defining behavior where the L bit is set to 0 instead of 1. See [RFC 4193 section 3.1, *Format*](https://tools.ietf.org/html/rfc4193#section-3.1). – user May 21 '15 at 20:27
0
The “intranet” is your local subnet, ie. your servers address/64. IPv6 RFCs strongly discourage networks smaller than /64, so it’s unlikely you’ll encounter any.
While there are link-local addresses, they aren’t really relevant here, because you wouldn’t use them.
An additional ULA network might be an option, although it poses additional management overhead.
Daniel B
- 60,360
- 9
- 122
- 163