Legacy toys
IP.cx
Very simple «Whats my IP?» service mostly inspired by icanhazip.com
but significantly shorter. It can also detect that you're visiting from -
which belongs to -
(-
) and your timezone is probably -
.
Usage is pretty straightforward. Do curl
to ip.cx
to get your IP as seen from public internet. Use keys -4
or -6
to get IPv4 or IPv6 addres respectively. Host info.ip.cx
will return simple JSON object with IP address, ISP, AS number, country and timezone — depending on what is known by CloudFlare geolocation database.
~$ curl -s4 ip.cx
192.0.2.42
~$ curl -s6 ip.cx
2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b
~$ curl info.ip.cx
{
ip: 192.0.2.42,
asn: 12345,
org: LLC Horns and hooves,
country: DE,
continent: EU,
lat: 12.3450,
long: 12.3450,
timezone: Europe/Berlin
}
CloudFlare origin 2 MikroTik firewall
URL: https://fedorov.net/api/cloudflare-origin/?v=6&list=rulesetlistname&remove=1
Fetches current CloudFlare origin IP subnets and converts to ready to use MikroTik firewall rules. Essential to allow website requests coming only via CloudFlare and block everyone else. Replace v=6
with v=4
to get rules for IPv4. Set list
to name your list as you wishe. Remove remove
parameter if you dont need to delete old list.