Which Services Uses Curlmyip.com I Am Getting Malware Alerts
Until we all fully embrace IPv6, we're living in a NAT world. And the folks who build security for that world ofttimes need to work around NAT that they didn't build.
Probably at least once per day, I need my current public IP address - usually to allow myself admin access to something for a few minutes past adding my IP to an admission list, sometimes to fix myself up as a temporary (as in a few minutes) server to receive an exfiltrated file - information technology's always something. Often I'g behind someone else's NAT gateway, so only looking isn't practical. And fifty-fifty if it is a gateway I built, looking up stored configs or connecting to that firewall to cheque takes more time than information technology should. How can nosotros make getting this data uncomplicated and safety?
Back in the day, we used to use www.whatismyip.com or world wide web.ipchicken.com. All the same, the way the internet has gone, these sites seem more about making me wait at ads than giving me the information that I really demand. And given the malvertising that we see being served up in ad services these days, I'd as soon just not go there anymore (literally).
OK, www.arin.net still gives me my public IP, with no ads. But then I demand to cut/paste information technology, or re-key it. Me, I'd as soon have my computer do that.
It also used to be that ip.blindhog.cyberspace had a telnet motorcar-responder that gave you this info (which would as well of course piece of work with netcat), just they went offline, possibly about the time mirai gave telnet a black eye last twelvemonth (??) **
So, what's left? icanhazip.com and dyndns.org even so have decent services. You lot can scrape these using:
wget -O - -q icanhazip.com
or
ringlet -s checkip.dyndns.org | sed -e "s/.*Electric current IP Address: //" | sed -e "southward/<.*$//"
If y'all desire them in your clipboard, pipe them into clip or xclip (depending on your OS).
And so for example, I accept a simple cmd file "getip.cmd" with either of these in it. To get the address into my clipboard:
getip | clip
Me, I put both approaches in my "getip" script, with one commented out - y'all never know when a service yous utilize every twenty-four hour period will change or go offline.
Is there a cleaner way to get your current public IP, or a niftier scripting approach? I have to admit, when I got to "it works" in two unlike ways, I stopped looking - if you lot have a better way to collect this info, past all means share in our comment section!
======
** for some telnet fun, effort a telnet session to towel.blinkenlights.nl
===============
Rob VandenBrink
Compugen
573 Posts
ISC Handler
Nov 9th 2017
There's a list of sites here that will return but your IP when curled > http://xmodulo.com/how-to-find-the-public-ip-address-from-command-line.html
$ curl ifconfig.me
$ coil icanhazip.com
$ roll ident.me
$ curlicue ipecho.net/plain
$ curl whatismyip.akamai.com
$ coil tnx.nl/ip
$ coil myip.dnsomatic.com
$ roll ip.appspot.com
$ roll ip.telize.com
$ curl curlmyip.com
I think Major Hayden, the man behind icanhazip.com, deserves a big shoutout and thank yous. Bank check out https://major.io for his weblog, additional services, and more info.
Of course I appreciate what Dyn does, as well.
17 Posts
Fifty-fifty Google will correctly requite you lot that info if you inquire "What is my IP"...
41 Posts
There are lots:
$ roll ifconfig.me
$ dig +short myip.opendns.com @resolver1.opendns.com
$ dig +short -half dozen myip.opendns.com aaaa @resolver1.ipv6-sandbox.opendns.com
$ curl ipinfo.io
And of class:
$ lynx http://google.com/search?q=what+is+my+ip
Or this 1, of class
$ wget -qO- icanhazip.com
All from:
http://world wide web.commandlinefu.com/
eleven Posts
> There are lots.
The site: www.who.is
shows my public IP-address, with a minimum of advertisements.
It is likewise useful for doing WHOIS searches.
Powershell:
wget http://myexternalip.com/raw | select content | fl
(wget is an alias for invoke-webrequest)
Kurt
five Posts
https://www.moanmyip.com/
2 Posts
Awesome, thank you everyone!
Peculiarly Beau, ident.me returns the IPv6 public IP address back!
I'll be updating my ain scripts now - these are *all* probable going in, I'll have them all REM'd out but gear up to go for when the start one on the listing goes offline or changes ..
573 Posts
ISC Handler
Surprised no ane has mentioned https://wtfismyip.com/ yet.
Crass, but efficient. I discover https://wtfismyip.com/text particularly useful
iv Posts
I apply ipinfo.io, when used via curl you get a json reply by default:
e.one thousand.
curl ipinfo.io
{
"ip": "86.187.161.99",
"hostname": "host86-187-161-99.range86-187.btcentralplus.com",
"city": "",
"region": "",
"country": "GB",
"loc": "51.4964,-0.1224",
"org": "AS2856 British Telecommunications PLC"
}
You can piping into jq to retrieve just the IP address:
curl -due south ipinfo.io | jq .ip
"86.187.161.99"
They limit to 1000 requests per 24-hour interval on a free option.
Dainty and Handy data. Is there too a way to get the pub IP from a switch or router backside firewall? In that location apply to be a site that telnet can be used to grab pub IP but do not remember it exists anymore.
I apply api.ipify.org and curl pipage to xargs/dig to retrieve hostname and ip when needing to direct the requests through a proxy:
curl --socks5 <proxy ip>:<proxy port> 'https://api.ipify.org' | xargs -i dig -x {} +noall +answer
echo
Returns ip and hostname.
2 Posts
Consider a 2nd ISP and a simple server program that returns the caller'southward IP address.
23 Posts
this is all i do
www.google.com/?q=my+ip+address
67 Posts
Source: https://isc.sans.edu/forums/diary/What+is+My+IP+Again/23024/
Posted by: monroebestudy.blogspot.com
0 Response to "Which Services Uses Curlmyip.com I Am Getting Malware Alerts"
Post a Comment