WEBVTT

00:00.360 --> 00:01.160
Hello friends.

00:01.160 --> 00:03.960
Welcome again to a new lesson of this course series.

00:04.280 --> 00:10.760
In this lesson, we are going to see how to find your public IP address with the help of Linux command.

00:10.920 --> 00:15.320
Okay, public IP address is really helpful for different purposes.

00:15.640 --> 00:23.720
For example, suppose if you want to connect to your ubuntu server via SSH, then in that case you need

00:23.720 --> 00:25.960
to know your public IP address.

00:26.000 --> 00:26.520
Okay.

00:26.560 --> 00:30.080
There are different reasons for which you need to know your public IP address.

00:30.400 --> 00:35.080
So there are two commands with the help of which we can find our public IP address.

00:35.920 --> 00:41.880
So when we type ifconfig command then we get an IP address okay.

00:41.920 --> 00:45.600
As you can see here we get 10.0 .2.15.

00:46.200 --> 00:49.000
This IP address is not public IP address.

00:49.320 --> 00:52.560
This IP address is private IP address okay.

00:52.600 --> 00:56.840
This IP address is not accessible outside this network.

00:57.320 --> 01:01.960
So to know our public IP address we just need to type the command curl.

01:03.320 --> 01:08.280
Then if config dot me and hit enter.

01:09.200 --> 01:12.880
And here you can see this is our public IP address okay.

01:12.920 --> 01:16.160
After this the next command is host.

01:16.160 --> 01:18.800
With host command we can find the public IP address.

01:19.320 --> 01:36.480
So for that just type host my IP dot open dns.com dot resolver three dot open dns.com and hit enter.

01:36.880 --> 01:40.120
And here you can see we got the public IP address.

01:40.600 --> 01:45.920
These are the two commands with the help of which we can find our public IP address.

01:46.760 --> 01:52.160
So this is how you can find your public IP address with the help of these two commands.
