Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Search Forums:



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-12-2012
Registered User
 

Join Date: Nov 2010
Posts: 36
Thanks: 16
Thanked 0 Times in 0 Posts
Need to know if there are ftp connections in my machine

Hello,

I need to know if there are ftp connections in my machine.

How can I find out that?any commands to use?

PS: i know how to find which users are on my machine now by using #who -r



regards
Sponsored Links
    #2  
Old 01-12-2012
in2nix4life's Avatar
Registered User
 

Join Date: Oct 2007
Location: East Coast
Posts: 144
Thanks: 0
Thanked 22 Times in 20 Posts
Not sure what OS you're using but if you have 'lsof' command available this will work:


Code:
lsof -i :<service port number>

i.e. for ftp
lsof -i :21

Hope this helps.
Sponsored Links
    #3  
Old 01-12-2012
Registered User
 

Join Date: Jun 2007
Location: North-West UK
Posts: 318
Thanks: 31
Thanked 43 Times in 41 Posts
If you mean "Who can open an ftp from my machine" then the list is probably anyone who can get to the command line. Depending what access they have depends what they can transfer.

If you mean "Who can open an ftp to my machine" then it becomes a little easier. Consider all your user accounts. You can prevent them having ftp access to your server by adding entries in /etc/ftpusers Peversely this is a list of those who are not allowed access. We keep a list of those who are and runa scheduled job to get everyone from /etc/passwd not in the allowed list and write them to /etc/ftpusers



Additionally, the ftpd can help you with logging too. Depending on your operating system, there may well be a debug flag you can set in /etc/inetd.conf (and refresh inetd, see man inetd.conf) so that all traffic gets logged with syslog. You can set it up to show both connections going from your server and those coming in. You have to remember that files can be moved both ways, so you can set logging to record which files and their direction too.

This is all dependant on the version of OS you have, so I can't be specific as a first bash.




I hope that this helps, but please post again to let us all know how you get on and what you have set up so that others may learn.



Robin
Liverpool/Blackburn
UK
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to transfer files from unix machine to local machine using shell script? vidhyaS Shell Programming and Scripting 1 08-08-2011 10:27 AM
shell script to copy files frm a linux machine to a windows machine using SCP nithin6034 Shell Programming and Scripting 3 07-21-2011 12:56 AM
To find the LATEST file from a dir on REMOTE machine and SCP to local machine? me_ub Red Hat 3 07-08-2009 12:57 AM
Best possible communication mechanism between a Solaris machine and a windows machine Krsh Solaris 7 02-05-2009 09:41 AM
Link type between working machine and server machine palash2k UNIX for Dummies Questions & Answers 1 05-22-2008 06:43 AM



All times are GMT -4. The time now is 03:34 AM.