Hype in this lesson, we are going to cover FTP, which stands for file transfer protocol, the FTP
is a standard network protocol protocols used for the transfer of computer files between a client and
a server on a computer network.
FTP is built on a client server model architecture using separate control and data connections between
the Clyde and the server.
This is the definition that I have.
I have actually got it from exactly from Wikipedia in a very simple words.
And FTP is a protocol that is used to transfer a file from server A to server B now that the protocol
is actually a set of rules used by computers to communicate so that that protocol that tells a computer,
hey, this is how it should be transferred, this is the port that you should use this as an encryption
that you should use.
These are all defined rules that are already built in.
But a computer, an operating system for the FTP, the default outpoured is 21, just like for SSA,
we have 22 or DNS, we have 53.
And for many other services that we run in the next four FTP, the USB Port 21 to communicate for one
server to another.
Now for this lecture, we need to Linux machines.
If you do not have to Linux machine, I would recommend you that you should go ahead and build another
Linux machine running Centaurus, which could be exactly the same one as you had previously.
So my first machine that I've been using is my first Linux VM.
This is a hostname and the second machine that I created and I'm referring it to as the hostname as
a Linux S.O.S seven is just a word.
It's just a name that I picked.
So anyway, I'm sure you already have my first Linux, VM, S.O.S, VM and what you need to do is to
install another Linux.
William So if I gave you a quick information on the Oracle virtual box, you see, this is the first
VM that I was running and this is the information.
It has one big machine, 10 gigabyte sorry, displace that second machine that I'm using as a server
is also has this same specification 10 gig, one gig, everything exactly the same.
Even I'm using the same version of S.O.S as well.
So but I am using a build a second one so we could go through this, do this.
Let's lesson.
Sorry.
All right.
So to put in a graphical way, let's go into detail.
So we have a client, a server that needs to send a file to another server, let's call it.
It's over a server B and whenever you have one server trying to connect to another server, that recipient
becomes a server and the sender becomes a client.
So it wants to send a file or FTP protocol.
Now, if this recipient server, if it's not running any kind of listening service to receive that protocol,
then it's going to reject that that transfer.
So we need to make sure that it is running FTP D Deman or the service or the application on that server.
And by default, whenever we run it, it will start up that service.
Unpure 21.
All right.
Now what is the process to actually configure that on clean and sober?
So let's look at the server side first.
So here are the quick steps that will cover to do the installation configuration of FTP on the remote
server.
After becoming a Ruleville check of the has FTP server install will check if you have Internet connectivity,
will install the V as FTP package on the server and then we'll modify the V FTP configuration file and
in that file will make certain configuration changes and these changes are here listed and we'll go
over them one by one and that will start, the service will enable the server so it could start a boot
time.
We'll stop the firewall D so the communication can take place between server eight and server B.
If you wanted to leave your firewall the up and running, then you have to add a rule for it to allow
to accept port or traffic 21.
So traffic on Port 21, you can find that online.
How to add FTP port on the firewall DB and then you could disable the firewall D if you're not using
it, just disable so it won't start back online.
And the last step is of course, make sure you create a user account on that FTP server if you do not
already have it, because that's, that's, that's how we will use to transfer files from server eight
or so A, B and the last.
It would be we will install FTP client on the client server, will become rude, gomersall, FTP, become
a regular user and then we will create a file called Cougar.
Now, this is just a regular file.
You could actually use any file name you like.
You could pick pizza, pasta, whatever the file name.
But if you wanted to be consistent, staying within you just make a file called Kruger.
Once with file is created, Denville FTP to the server will enter our credentials, will put an API
for binary and then hash for hash tagging that so you could see the progress and we'll use a comen put
Kuga.
Once this transfer then we simply type it by to get out of that FTP process.
All right.
So now let me go back to the installation process of FTP on the server.
All right.
As I said before that I have a client, which is my first and which is the very first Linux VM that
I created.
And I called it my first Linux VM.
And then I have another machine that I'm using for this lecture purpose.
And then that that machine I'm calling Linux S.O.S now in this machine, once you have it built and
configured, I want you to become root.
By the way, I was logged in as myself, so if I exit and I do, who am I?
You going to see that on this server?
I have already created an account.
I have Zol.
So if you do not have a camera during the installation, you can create a go ahead and create it if
you have it.
Good.
Now become rudek.
After becoming rude, of course, you could do.
Who am I?
Just to confirm of which users you are logged in as now you need to install the DP Daemon or the FTP
service on your machine before you install it.
Check if it has already been installed.
So I recommend you type R.P.M. Dash Kuai and grab for V.
S FTP.
This is the name of the package that needs to be downloaded.
OK, it is not downloaded and it has not been installed, so I will run the command before I run the
command or before I go out on the centralized repository to install it.
I wanted to make sure this machine that I'm logged in right now has Internet access.
So I'll do simply paying a dub dub, dub dub, Google Dotcom.
And you see, I'm getting a response back perfect's.
It means I have Internet connectivity.
Now I will go ahead and do Jum install the.
Now, Discman is going to the all the repositories and it is checking, hey, do you have FTP prepackage
that I need to download and then install it?
Did it did go there.
It checked and it says, yes, I do have it.
And this is for architecture 64 bit.
And the version that I have, the latest one is 3.0 to do you want to download.
And the size is 171.
Yes, I do want to download.
So simply type Y and hit enter is saying downloading package and then is saying it has a fingerprinting,
some information, some security information.
Is it, is this OK that comes with a package.
That is fine.
Go ahead and click.
Yes.
Running transaction check, running transaction test, it will go through the process of fetching that
package, downloading the package, installing the package and then verifying the installation, and
at the end you say it is completed and verified.
Of course.
Now, if you run that same comment, R.P.M., Dash Kuai and graphologist, you will see it will show
up the package that is installed.
There you go.
This is the package that installed.
So we confirmed that it has been downloaded and of course, it is installed.
Now we need to configure it.
So every time you hear the word configure, it means we have to configure it on the configuration file.
The configuration file for FTP server is at CBS, FTP, PD slash FTP car file.
So before I modified, I always recommend that you make a copy of it.
So let's go to the ftp d do ls minus l tr and you will see this is the file.
Now, I want you to go ahead and make a copy of that, so copy cpv soft-pedal cough WFTDA cough Dorridge,
this is the name I usually pick to make a copy as it reads.
It's will tell me that this is the actual original fort.
All right, the copy of the backup has been created now I need to modify that fall of EPD dot com fall
and now I have to go through these parameters that I have listed on my slide to modify these parameters.
The first thing is find the following lines and make the changes as shown below.
Disable anonymous login.
So I will search for slash A and O and M sorry y m o u.
S Anonymous.
It took me to the first word because I'm doing a search within B it took me the first word.
But this is not the line that I'm looking for.
So I'm going to hit and to go to the next one.
And there it is says Anonymous underscore enable and it is.
Yes.
So go ahead and remove that and put no because you don't want anyone else to come into your FTP server
as anonymous.
Good.
Next parameters is a SIAC I, a skuzzy I.
And now you have to uncommented these two lines.
Upload enabled, download enabled, that's perfectly fine now come down to where it says F.T. PD, search
for that.
And right there it says FTP underscore Baner welcome to bloo ftp server.
That is fine.
And you could remove that.
Uncommented now, if you want to change to welcome to Blyer FTP server to welcome to my beautiful laptop
server.
That is fine.
You could do that.
Now, the last thing it says ad at the end of this file, if you wanted to go to the end of this file,
you have to press shifted and it will take you to the end.
And here I'm just going to put first.
I'm going to put.
Comment.
As local.
Time and I'm going to put in their parameters, it says use underscore local time equal.
Yes.
Perfect that only these are the only configuration changes you have to make now go ahead and save the
file.
Perfect file is saved, now it's time to start that BSF TPD service, and for that we have to use the
command system CTL Start EPD.
It is started.
Let's check the status if it is actually started or not, yes, start to see active here.
Beautiful.
Now, I want to enable that.
So every time my system reboots, I don't have to go back and start that service manually again.
I want that service to start every time this system reboots.
And for that I have to use a command system, CTL space, enable WPT hit enter.
And it is our it has been enabled now.
Perfect.
Now I want to disable the firewall on the server to disable it.
I'll use the comment before I disable.
I need to stop it.
So stop firewalled.
Now, as I said earlier, if you do not want to disable Firewall D, which I don't recommend you disabling
it because this is my lab environment, so I'm OK.
So if you're in the production environment and you have firewalled running, then you need to add the
rule to allow poor 21 to incur as an incoming traffic for that firewall.
Anyway, going back, let's stop the firewall because I'm using my lab and I really don't need that.
It is stopped now.
Let's check the status.
See right here, it says inactive, dead, perfect.
Now I want you to disable it, meaning every time a computer reboot, I don't want this service to start
back again.
It is disabled, perfect, beautiful.
We did our work on the server side, and the last line you're going to see is his user ad I have if
the user does not exist already, I mean, I do exit out of the route and I do.
Who am I?
You see, I already have an account, my account.
I have Tzahal on this machine.
So I don't need to recreate if you do not have the account or if you do not have an account that you
will be using for the FTP purpose, then I want you to go ahead and create an account anyway.
So this is the configuration we followed on the FCP sorry, on the FTP server.
Now we have to do a few things on the FTP client so the client needs to install FTP.
The package and what to do that, let's go in to our client.
And my client is right here.
This is my first slingsby perfect now here, if I become rude.
By the way, I was logged in, as I have, so now if I run FTP Command, you see it, says Basche,
FTP Command now found the reason it is not a phone because I do not have the FTP Klyde installed, so
I need to install the client now.
Of course, as I said, always check to make sure you have.
Internet connectivity and for that pink, any website that you like online and it says, I am getting
their back perfect now I could go ahead and do some install FTP.
Now, this is not the vest.
This is FDP.
So we are installing the client part here, not the server package.
All right, so once you do jam install FTP, it will go online, check for the package.
And it says running transaction check package, this will be installed perfect, this is what I want,
the version number so and so and the size has been 61 K.
That's perfect.
Go ahead.
Why?
OK, transaction tests succeeded, verifying it, installing it, verifying it and completed it, beautiful.
So now if you type FTP and just simply hit enter, you see it actually took that command and it brought
you into the FTP interactive session.
You don't want to use that right now.
Just click buy so you could get out and get your back.
Now I want you to become a afsal again.
You could do as you Dashi Opsahl or of course in this case it's yourself.
But or you could just simply do exit and it will bring you back to your own user account.
Iveson or so.
If I do X minus L tr these are the directories and files I have right now in my.
A home directory.
So this is home directory.
OK, now I want to create a file called Touch Kruger.
It is created, if you do, I let myself here, you see it has zero bytes and right here it says zero
bytes.
If you want to add something to it, let's say I will do this myself.
Hear me out.
I'll put that to Kruger.
Perfect now and you do at this point, LTA, you see now it has a total of five hundred and seventeen
bites.
If you do cat on Kruger, you're going to see basically the output of.
Exactly.
That's my Aselton anyway.
So I.
Why did I do that.
No reason.
I just wanted to have some information in that file.
You could have done V.I. and typed in something else like we are.
Krüger like this is my file, blah blah.
Anyway, I just wanted to populate that file with some information so it won't be zero bytes now.
Right now it has five hundred and forty five bytes.
All right, beautiful.
Moving along now, we have the file.
Now, the question is, I wanted to transfer that Krueger file to the server.
And the server is the one where we installed that FTP package.
So in order to transfer the file over to the server, we need to know the IP address of that server.
So I'll go back into my server to send my server for the IP address.
I'll type if config.
And if I move up, you're going to see the IP address for ENPI zero, the signed one is 192 161 58.
Porfiry got the IP address.
Now I'm going to do FTP 192 168 one.
DOT 58.
Hit enter.
Beautiful.
There you go.
Says, welcome to Blyer FTP server, see that blasted thing I told you if you wanted to put it like
beautiful here would show beautiful.
OK, so anyway, it says name and IP address and user name is Ives.
Also by default, it picked that username that I've been trying to ftp it over.
If you wanted to use a different username, then you will specify here, let's say you wanted to use
John or whatever, but I wanted to use my own name.
I was also I'm not going to enter anything.
I'm going to leave it as default and I'm going to go ahead and hit enter.
Please specify the password.
This is the password of your Absol account to that server or to that remote machine.
It says 230 large and successful remote system type is Unix using binary mode to transfer files.
Perfect.
Now, what I need to do, I want you to type by Orbin as switching to binary mode because you want to
transfer the file, always using FTP to the binary mode.
That is fine.
Then I want you to type hash hash meaning when you are doing the transfer.
Show me the hash tags which will show, which will tell me that there is a progress going on in hash
tag progress.
Now time to put the file.
So whenever you and it's time to transfer you use the command put because you are going from A to B
and do Kuga.
Hit enter.
Right here, it says.
As soon as you hit put Kruger Local, Kruger and what?
Entering passive mode 150, OK, to send data hashtag, remember, this is a progress, if it if it
was a huge file, you you would have seen so many hashtags, 226 transfer complete 545 bytes.
Since this is the size of the of my file 545 success.
It succeeded.
Perfect.
Now you could just do by now you're back out to your machine.
Now do you want to confirm underserve has been transferred.
Of course, yes.
Let's go to the server.
I am in my home directory and let's ls minus l tr and you're going to see right here.
This is Kruger.
This is the file transfer.
That's how the FTP file transfer works.
I hope this lecture actually have served its purpose.
And you know how the FTP works.
If you have any question, please do not hesitate to contact me.
I'm here to help you.
So let's go and work this FTP server and learn this thing together.
Good luck.