How to find port number for vsftpd_v1 using netstat -an

still stuck on this i dont know how to check the port using netstat -an
i tried netstat -an | grep vsftpd_v1.
but i read somewhere the client should be connected to server
what should I write in my vsftpd_v1.conf to make connection between client and serve so that when I hit the command netstat -an | grep vsftpd_v1 I will get port number
still stucked on milestone one from morning

Hi @hrithik_cr7,

Can you try grep ping for the port which the FTP server listens to by default?

how to get port number of vsftpd_v1 :frowning: ?

Check if you can play around using ps command
If your intention is to just find the process running or not you can confirm using pidof

(And Go through the milestone 1 completely. A few changes needs to be done in conf file )


I made all these changes

when my server started running I opened new terminal gave command
ps -ef | grep vftpd_v1

Than I am trying to search the port using netstat -an I am stuck there

I need to give any command related to port
liken listen_port ?
I am missing it ?

Yes it is given to Change the listen_port that QBox listens on to 8081 by updating vsftpd_v1.conf . So you need to do that.
But once you made changes to conf file, did you restart vsftpd_v1

(But if you were already running vsftpd_v1, pidof should have worked fine. You mentioned using ps, even that works. But anyway now you have made changes to conf file I guess. Do restart vsftpd_v1 )

I made changes listen_port=8081

still I am not getting any port that is 21

I don’t know where I am going wrong

after making changes in .conf
I have to run
sudo ./vsftpd_v1 vsftpd_v1.conf
to restart and save the changes

or any other command
sudo systemctl restart vsftpd_v1.conf

netstat -an | grep ?

what I have to search

the port number
or the vsftpd_v1
or the pid from
ps -ef | grep vsftpd_v1

Hey, how did you make changes to conf file.
can you confirm that the changes that you made actually reflected.
I don’t see any changes maybe you had given root access earlier and the changes didnt reflect after you edited just like that. You can use vi to edit files

In milestone 1, at first we wanted you to know about the default port being used,
then make changes to conf file and let QBox listens on to 8081
if you successfully make all those changes and run the command ie given you’ll be able to see 8081 in the output

apart from that there’s nothing much to worry about. you can proceed once you are able to find this on your output

this is what I am doing but
netstat -an
is not displaying either 8081 listening
or 21 listening

Status : any changes made to conf file weren’t reflecting

To edit conf file. permissions need to be with crio-user. (otherwise vi can used.)
Once you make changes, root permissions can be given.
Before making changes and after making changes to conf file compare output of netstat.

then use the command ie given in the milestone (cz ie required for assessment purpose)

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.