본문 바로가기

스크립트

What Is My IP?(myip)

반응형

What Is My IP?

bind utilities

  • centos
yum install -y bind-utils
  • ubuntu
apt-get install -y bind9-dnsutils

Public IP Address

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

Private IP Address

ip route get 1.2.3.4 | awk '{ print $7 }' | egrep -v '^$'

 

728x90
반응형