Creating a Public Network

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
2 hours 51 minutes
Difficulty
Beginner
CEU/CPE
3
Video Transcription
00:00
Hello. My name is Jasmine Jackson and our courses intro to vagrant. And in this video I will show you a demo on how to create a public network and vagrant. So let's go. The learning objectives objectives for this video are we will learn how to create a public network in vagrant.
00:19
So let's start with the demo.
00:20
Okay, We have our vagrant file open. And remember, the vagrant file is the most important file in vagrant as it specifies the configuration for your vagrant machine and looking at lines 37 to 40
00:38
it specifies how to create a public network.
00:42
So what we're going to do is we're going toe uncommon outline 40 and we're not going Teoh, change this line. We're just going to keep it as it is now Remember, for public networks, you can specify the i p
00:58
using d HDP dynamic host configuration protocol
01:03
where your I P is automatically assigned or we can use aesthetic I p where we can specify an I. P. Well, how Line 40 is configured. We're going to use d HCP dynamic host configuration protocol,
01:21
but the line is using d HCP implicitly as we don't have to explicitly
01:29
specify it online. 40 The syntax here is automatically telling vagrant we're going to use the D http protocol because we did not specify a static i p.
01:42
So let's go back to Commander
01:46
and
01:49
let's into the command vagrant
01:52
up
01:53
to start our vagrant machine which is our boot to trustee 64 machine.
02:07
And as you can see here for network interfaces now we have abridged
02:15
network interface which specifies that we have a public network
02:22
and you also notice In our last lecture we talked about four reports where we had a line 80 for guests that went to 1234 on the host. You don't see that line anymore because we re commented out that line So it's not showing up in our configuration.
02:40
Four vagrant for vagrant machine.
02:44
So now I'm going. Teoh answer Vagrant
02:47
Ssh!
02:49
To create a secure show to our vagrant machine are Mobutu trustee 64 machine.
02:57
Now I'm going to enter the command. I have config
03:01
for Lennox. If you're working with windows, it will be i p config
03:07
And now we have each one and we have
03:14
this I p address of 19 to 1681 83 1 83 Excuse me. I'm thinking of the http port of 80. So repeating the
03:29
i p addresses 192.168 dot one die 83. So we're going to
03:38
copy this,
03:44
and we're going to go back to our host machine
03:50
and we're gonna answer http,
03:53
okay, If I can
03:57
Oh, I forgot to copy the one
04:00
and press answer, and and our public network
04:05
was configured properly. And the reason I know this is because, just like with our port fording
04:13
our own boot to Apache, http, default page is rendering. And as I said in the port, fording that I'm going to repeat here. My host machine is a window 64 machine, and I do not have Apache installed
04:30
on my host machine. I only have Apache installed
04:33
on my vagrant machine, which is unbuttoning machine trustee 64. So I know that our public network was successful because I'm able to see this default page. So to recap,
04:48
we ian commented out the line Life 44 Public network. And as I said before, with public networks, you can either configure it using D HCP Dynamic host configuration protocol
05:03
where the I P is automatically assigned or you can assign the i p with a static I p
05:11
Well, we use d eight c p and it might not Look,
05:15
you might not be able Teoh readily see that online 40. But since we didn't specify i p address for a static I p address, vagrant knows that implicitly were using d eight c p.
05:30
So next What we did was we saved our vagrant file. We went back to Commander
05:38
and we started our vagrant machine. And as I said before looking at the network interface, we see that we had a second adapter which was bridged, which was a tell tale sign for us that we were using a public network.
05:55
Then, after our machine Buddhist successfully, we created a secure show into our vagrant machine. And then we enter the I F. CONFIG command to get our I p address. And from there
06:13
the reason I used the Ethan one is because I p addresses that start with 192.168
06:20
are usually public networks. They're usually internal
06:26
public networks. So I knew that this i p was most likely the I p that was generated from our Vacher file. From there, I went to my host machine and type in http.
06:45
192 down 168 That one. That 83.
06:47
And I was able to get our own boot to Apache. Http Server Defar page to render. And I knew that our public network was configured properly as I'm going to repeat again. I don't have Apache installed on my host machine, and my host machine is a window 64 machine.
07:08
So I knew that our public network was configured properly.
07:11
Now let's go back to our lecture. So in summary in this video, we learn how to create a public network in vagrant. And as I said before, the really good thing about vagrant is that the commands are pretty intuitive and it really doesn't take a lot to configure
07:30
a vagrant machine. So in our next lecture, I will provide a demo of how to create a private network. So I can't wait to see you in that video. Have a good day. Bye.
Up Next