I have installed vsftpd and configured as per several tutorials (just the very basic, standard setup) but when I run cat /etc/services there is nothing appearing for Port 21.

What steps do I need to follow in order to add this in?

link|improve this question

feedback

3 Answers

up vote 1 down vote accepted

The /etc/services file is just text. You can edit it using your favourite text editor. My CentOS system has the following for ftp

ftp-data        20/tcp
ftp-data        20/udp
# 21 is registered to ftp, but also used by fsp
ftp             21/tcp
ftp             21/udp          fsp fspd
link|improve this answer
feedback

/etc/services does not provide you a real-time list your server has running.

Use netstat -tlnp to see processes listening on some network ports.

link|improve this answer
Thanks, I ran that and noticed my Local Address for :21 is 0.0.0.0, should this not be 127.0.0.1? – Toby Jul 19 '11 at 7:43
1  
0.0.0.0 means "listen on all addresses available on this server". 127.0.0.1 would mean you only could contact your server from localhost and not from the outside world. – Janne Pikkarainen Jul 19 '11 at 7:44
feedback

You just need to open up /etc/services in a text editor and add it. There's nothing special that needs to be done. I'm incredibly surprised that it's not in there already; try a grep for ftp.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.