Also allow custom IPs and domains to be looked-up

This commit is contained in:
2017-09-18 23:56:11 +02:00
parent 97b44a0935
commit 6a46083bec
3 changed files with 175 additions and 23 deletions

View File

@@ -4,6 +4,8 @@ A simple PHP script to tell a visitor's IP address and more information. This fi
## Plain return
Example: [/][https://ip.nandus.net]
When the script is properly installed, one can visit/curl/wget the website to just receive one's public IP address. This is very useful in combination with other scripts (check out my snap-dyndns packages for example).
```
@@ -13,6 +15,8 @@ max@laptop ~> wget -qO - ip.nandus.net
## Detailed return
Example: [/myself](https://ip4.nandus.net/myself)
Given the location of the script is `ip.example.com`, you can also receive more information about the HTTP headers or the IP's reverse lookup:
```
@@ -30,6 +34,17 @@ HOSTNAME: p5B3E4401.dip0.t-ipconnect.de
IPv4 REVERSE LOOKUP: 91.62.68.1
```
Additionally you will be given a whois output of your IP.
## Custom DNS and IP lookup
Example DNS: [/dns/example.com](https://ip.nandus.net/dns/example.com)
Example IP: [/ip/8.8.8.8](https://ip.nandus.net/ip/8.8.8.8)
You can also freely look up any hostname or IP. For domains, this will return a useful list of different DNS records (A, AAAA, NS, MX, TXT, SOA etc).
You will also be given a whois output of the domain or IP.
## Ideal domain setup
In order to use IPv4- and IPv6-only domains, you'll have to have control over the DNS nameserver records of your own domain.