
Contents of the article
What is IP address
Find out a public IP address using Curl and IfConfig.me
Determine your public IP address using dig
Find the IP address in Termux using WGET
Using the Curl command to display IP addresses
Display IP address TermUX by the WGET and IPECHO command
Hot keys to determine the IP address in Termux
In this article, I will introduce you to five ways to find out a public IP address in Termux.
What is IP address
The IP address is similar to a digital address that unambiguously identifies each device connected to the Internet. This is a number of numbers separated by points or colon, depending on the version used (IPV4 or IPV6).
IP addresses are critical for devices to communicate with each other on the Internet. They are used to route data packets, ensuring that information reaches its intended destination, whether connecting to the Internet, accessing websites, sending emails, or streaming media.
Essentially, IP addresses play a vital role in the operation of the Internet, allowing devices to identify and communicate with each other across a vast global network of interconnected devices. Since we are ethical hackers, we need to know our own IP address before attempting anything.
Find out a public IP address using Curl and IfConfig.me
Team curl comes pre-installed in Termux. Just run the below command and it will show you your public IP address.
1 | curl ifconfig.me |
The command will retrieve the public IP address using the ifconfig.me site and display it in Termux.
Determine your public IP address using dig
The following command uses the DNS server. To use the command below, you must have the dnsutils :
1 | pkg install dnsutils |
Then run the command:
1 | dig +short myip.opendns.com @resolver1.opendns.com |
The team will ask for the DNS server (Resolver1.opendns.com) your public IP address and display it in the Termux terminal.
Find the IP address in Termux using WGET
The same can be done using a command WGET and site IfConfig.io.
1 | wget -qO- ifconfig.io |
Using the Curl command to display IP addresses
And it looks like the simplest team that kicks the site IDent.me and display the IP address of the phone:
1 | curl ident.me |
Display IP address TermUX by the WGET and IPECHO command
Another way to find out the IP address is to use the wget command and the ipecho.net website:
1 | wget -qO- https://ipecho.net/plain ; echo |
Hot keys to determine the IP address in Termux
To quickly determine an IP, you can create an alias.
Below is a simple example of an alias command that, when you press " i " on your keyboard, will display the public IP:
1 | echo "alias i='curl ifconfig.me'" >> /data/data/com.termux/files/usr/etc/bash.bashrc |
Instead of “ i ” you can assign any key to your friend.
To remove this alias, go to:
1 | /data/data/com.termux/files/usr/etc/ |
And remove the alias from the bash.bashrc .
Termux IP Tools
Comments