Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Tag: dns

Find Public IP in Linux Using CLI

A musician must make music, an artist must paint, a poet must write, if he is to be ultimately at peace with himself. What a man can be, he must be

— Abraham Maslow.

Hey guys, ever been in a situation you need to query your public WAN IP without any browser. Glad you came to the right post.

Prerequisites

  • dig – Dig stands for (Domain Information Groper) is a network administration command-line tool for querying Domain Name System (DNS) name servers. It is useful for verifying and troubleshooting DNS problems and also to perform DNS lookups and displays the answers that are returned from the name server that were queried.
  • curl – cURL is a computer software project providing a library and command-line tool for transferring data using various network protocols. The name stands for “Client URL”, which was first released in 1997.
  • wget – GNU Wget is a computer program that retrieves content from web servers. It is part of the GNU Project. Its name derives from World Wide Web and get. It supports downloading via HTTP, HTTPS, and FTP. Its features include recursive download, conversion of links for offline viewing of local HTML, and support for proxies.

What are the ways to find my IP?

Here are ways to find your own public IP from the terminal.

First is using OpenDNS servers. The OpenDNS servers are always free and a toolkit for a network engineer.

dig +short myip.opendns.com @resolver1.opendns.com

If resolver1 isn’t responding try the resolver2 to get your query.
Also you could achieve this query using Google’s nameservers.

dig TXT +short o-o.myaddr.l.google.com @ns1.google.com

The second is using curl or wget which is more common on many distro’s without installing any other packages. While this is much slower in resolving, the tools used is much more common.

curl https://ipinfo.io/ip

For wget command just replace the curl word above.

Conclusion

I haven’t listed all the ways, as there are many ways to achieve this. But all this commands have been tested and used by me several times, it always save my ass when there’s a problem. If you have additional command that you want to share DM me at @ffimnsr.

Top 3 DNS Providers That Provides Good Service in SEA (Southeast Asia)

If you give a hacker a new toy, the first thing he’ll do is take it apart to figure out how it works.

— Jamie Zawinski.

DNS or Domain Name System sometimes called the phonebook of the internet is one way for us to easily access our favorite website, it translates and redirect human readable domain names (e.g. yahoo.com, google.com) to their respective IP address. Finding the good DNS provider is vital in accessing information that is sometimes censored by our government, ISP and the likes. This are my top three good DNS (Domain Name System) providers that are really fast, secure and reliable that can be use in Southeast Asia.

Cloudflare

Cloudflare Public DNS (IPv4)

1.1.1.1
1.0.0.1

Cloudflare Public DNS (IPv6)

2606:4700:4700::1111
2606:4700:4700::1001

So why Cloudflare1? Choose Cloudflare if you want less than <1ms of domain name resolution. Seriously, they have the fastest name resolution on the internet.

Google

Google Public DNS (IPv4)

8.8.8.8
8.8.4.4

Google Public DNS (IPv6)

2001:4860:4860::8888
2001:4860:4860::8844

So why Google2? You will use this if you need an old but still good reliable DNS server. Its been used as a primary name resolution on big companies as well as local workstation. Its much more better than your ISP (Internet Service Provider) provided DNS.

Yandex

Yandex DNS (IPv4)

77.88.8.8
77.88.8.1

Yandex DNS (IPv6)

2a02:6b8::feed:0ff
2a02:6b8:0:1::feed:0ff

So why Yandex3? You’ll choose this if you’re a webmaster due to super fast name resolution propagation. This is the fastest DNS for name resolution propagation, on which ever region you are currently.

These three are mostly corporate but they do provide fast speed TLD name resolution. And if you really still feel they can be manipulated, feel free to enable DNSSEC. For example on CloudFlare, a single domain would resolve at less than <1ms.

So guys, what are your top DNS providers?


  1. Cloudflare, Inc. is an American web-infrastructure and website-security company, providing content-delivery-network services, DDoS mitigation, Internet security, and distributed domain-name-server services. Wikipedia ↩︎
  2. Google LLC is an American multinational technology company that specializes in Internet-related services and products, which include online advertising technologies, search engine, cloud computing, software, and hardware. It is considered one of the Big Four technology companies, alongside Amazon, Apple, and Facebook. Wikipedia ↩︎
  3. Yandex is a technology company that builds intelligent products and services powered by machine learning. Our goal is to help consumers and businesses better navigate the online and offline world. Since 1997, we have delivered world-class, locally relevant search and information services. ↩︎