Networking fundamentals· 8 min read

What is an IP, ASN, DNS and PTR? A plain-English guide

Every time you open a website, your device exchanges a small bundle of identifiers with the rest of the internet. This guide explains the four most important ones — IP, DNS, PTR and ASN — without jargon.

Close-up of network cables plugged into a switch
Photo by Thomas Jensen on Unsplash

What is an IP address?

An IP address (Internet Protocol address) is a numeric label assigned to every device that talks to the internet. It is the equivalent of a postal address: without it, no server would know where to send the page you just requested.

There are two versions in active use:

  • IPv4 — four numbers between 0 and 255, e.g. 203.0.113.42. About 4.3 billion addresses exist, which is no longer enough for the modern internet.
  • IPv6 — eight groups of hex digits, e.g. 2606:4700:4700::1111. Practically unlimited address space.

Your public IP is the one the rest of the world sees. Your local IP (often starting with 192.168. or 10.) is only visible inside your home or office network.

Rows of servers in a data center
Every server, router and phone on the internet has at least one IP address.

What is DNS?

DNS (Domain Name System) is the internet's phonebook. Humans remember scanforsecurity.com; computers need an IP address. DNS turns one into the other.

When you type a domain into your browser, roughly this happens:

  1. Your device asks its configured resolver (often your ISP, or a public one like Cloudflare 1.1.1.1).
  2. The resolver asks the root, then the .com servers, then the domain's authoritative server.
  3. The final answer — an A record (IPv4) or AAAA record (IPv6) — comes back.
  4. Your browser opens a connection to that IP and downloads the page.

Common record types you will see: A, AAAA, CNAME (alias), MX (mail server), TXT (verification and SPF/DKIM), and PTR (reverse lookup, below).

What is reverse DNS (PTR)?

A PTR record does the opposite of an A record: it maps an IP back to a hostname. If a forward lookup answers "what address is this name?", a reverse lookup answers "what name claims this address?".

Reverse DNS often reveals more than people expect:

  • Residential ISPs frequently set PTRs like cust-203-0-113-42.example-isp.net — exposing the ISP and even the region.
  • Cloud providers expose names such as ec2-...compute.amazonaws.com or scanner-01.shodan.io.
  • Mail servers must have a sensible PTR or their messages get rejected as spam.

You can see your own PTR right now on the ip.scanforsecurity.com home page — the result is labelled "Reverse DNS (PTR)".

What is an ASN?

An ASN (Autonomous System Number) identifies a network on the internet — usually an ISP, hosting provider or large enterprise. Every public IP belongs to exactly one ASN at a time, and ASNs talk to each other using BGP, the protocol that holds the internet together.

Examples you have certainly hit before:

  • AS13335 — Cloudflare
  • AS15169 — Google
  • AS16509 — Amazon AWS
  • AS32934 — Meta / Facebook

Knowing an IP's ASN tells you, at a glance, whether the visitor is on a residential ISP, a corporate network, a datacenter (often a VPN, scraper or bot), or a known cloud provider. That's why our checker shows the ASN, its organisation name and a short description right next to your IP.

How they fit together — a single request

Putting it all together, when you visit a site:

  1. DNS resolves the hostname to an IP.
  2. Your device sends a packet from your public IP to that IP.
  3. The server logs your IP, looks up its ASN (to spot abuse) and may do a reverse DNS lookup (to label the request).
  4. It also reads your User-Agent and other headers to figure out the device and browser.

Each of those identifiers is harmless on its own. Combined, they are usually enough to identify the network you are on, your country, and often your ISP or employer.

Check your own IP, PTR and ASN

The fastest way to see all of this for your current connection is to open the homepage of ip.scanforsecurity.com. It displays your public IP, reverse DNS, ASN with organisation, ISP, geolocation, timezone and device — and runs a one-click WebRTC and DNS leak test if you're behind a VPN.

From a terminal, the same data is available as JSON:

curl https://ip.scanforsecurity.com

Test your own IP, DNS and leaks right now

Run a free check of your public IP, reverse DNS, ASN, geolocation, device, and WebRTC/DNS leaks — no signup required.

Open IP & leak test →