You are not logged in.
Checkip is simple (and lightweight) script that checks to see if your external IP address changed and if so sends an email with the new IP address. Useful if you manage remote boxes whose external IP addresses change periodically. The only dependencies are curl and either mailsend or heirloom-mailx.
Tested with my free gmail account and works great. As always, feedback is welcomed. Plz comment here or send a pull request if you can improve the code.
Upstream URL: https://github.com/graysky2/checkip
AUR Package: https://aur.archlinux.org/packages/checkip
Last edited by graysky (2013-09-21 13:34:30)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I was really surprised that you had 5 votes on the AUR page just after posting this, until I noticed the "first submitted" date.
Incidentally, the checksum needs to be updated.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
@Xyne - Yeah, I wrote this a few years ago with the version 1.x series using a perl script for mail sending but I found it [the perl script] to be unreliable in a few cases and looked elsewhere; version 2.x keeps the underlying code base but has been updated to use mailsend which seems more robust to me and also offers more sophisticated authentication options.
Last edited by graysky (2013-04-27 12:32:30)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Nice script! The address http://icanhazip.com gives your external IP in plain-text format (not a single HTML tag). Maybe you could cross-check the values from both websites to increase your confidence that no one is lying (who knows these days...)
Offline
@vitor - Thanks for link. It could simplify the code but strategically, I would like to avoid an external service all together. Does anyone have a suggestion to find the external IP address without relying on an external website? Tools like /usr/sbin/ip will only return the internal IP address to my knowledge.
Last edited by graysky (2013-04-27 12:41:09)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
curl ifconfig.me
Offline
curl ifconfig.me
Right but this is invoking an external webserver... I'd like to do it without this need. I have been poking around in the iproute2 package but haven't found anything.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Does anyone have a suggestion to find the external IP address without relying on an external website?
I think you will only be able to get the information you are looking for directly from your modem or from external servers. From inside my network I am able to telnet to my modem and run ifconfig, which has an interface called ppp_something displaying the external IP address. I can also accomplish the same by parsing the http interface, and this thread contains some related information. However allowing the perl script to handle all types of modem would probably require user input, at least the first time the script was run on that system.
Offline
Thank for the link. As you pointed out, I too think that presented too much complicity.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Updated to v3.01 this morning which includes support for mailx via heirloom-mailx.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
There's a way to use a DNS server here. dnsutils contain dig.
Offline
There's a way to use a DNS server here. dnsutils contain dig.
Thank you for that link. Updated.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline