Jump to content
rice.shawn

What's My IP Address?

Recommended Posts

Just a quick bash workflow that might come in handy: the workflow queries "What's My IP Address?" in order to find your external IP and uses ifconfig to find your internal one(s). If you select one of them, then the IP address will be copied to your clipboard.

 

Find it on Packal.

Share this post


Link to post

Just a quick bash workflow that might come in handy: the workflow queries "What's My IP Address?" in order to find your external IP and uses ifconfig to find your internal one(s). If you select one of them, then the IP address will be copied to your clipboard.

 

Find it on Packal.

 

And you can find one that was already there - http://packal.org/workflow/network-info

 

That one works for all interfaces including VPN tunnels.

Share this post


Link to post

Does this mean Packal's search needs work?  ;)

 

Good work both of you!

Edited by deanishe

Share this post


Link to post

I think it means that I need to look through Packal before I start to write something. Ctwise's provides a bit more information. Mine picks up a few of the internal vmware IPs, but that's probably not too useful for most people.

 

Well, at least I didn't spend more than 20 minutes writing it.

 

I'll update the Packal page for my workflow and put a link to Ctwise's.

Share this post


Link to post

:D We all know that writing our own Workflows is far better than using someone else's. NIH Syndrome is the natural state of any developer with no deadline.

 

Rest assured, if I need to know my machine's IP addresses, I'll be rolling my own, not using either of your workflows. Quality be damned, you probably use ugly icons or the wrong language or something  ;)

Share this post


Link to post

Hey! I wrote mine in bash, which, I think, is about as fast as you can make it! And Ctwise's is in Ruby, which works with some incredible speed! Wrong language my <insert some word here>. The icons, well, that's maybe more open to critique.

Share this post


Link to post

I am using this workflow sometimes and recently discovered, that firing it will show the external IPv6.

But sometimes you want to know the external IPv4 of your network.

In case you want to switch "IP Address"  back to IPv4 you simply need to replace the URL used in the script to fetch the external IP

from icanhazip.com

to ipv4.icanhazip.com

To achieve this just open the workflow in Alfred, open the first step of the workflow "ip" (Script Filter) and there you find the URL in the second line.

Replace it and save the workflow. Now the workflow will display IPv4 of your local network.

Share this post


Link to post

thanks a lot guys for all your helpful insight! i found some very useful info for me and that's amazing. however i was just wondering if i may come back here with questions later? i ask it as i'm new here so i'm not sure.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×