identify FTP port?

barrowman

Registered
Is there any means via software/terminal to determine the ftp port no etc, as I am having no ends of trouble trying to ftp to a site, and I'm getting an "illegal port error when trying to ftp in Dreamweaver, fetch just doesn't work either" So I would like to determine whether the mac, airport, dsl router, ISP is at fault.

Just wondered if there was a view to view what port these things are running on...
 
most unices store those port informations in /etc/services (unless the service runs in stand alone mode, in which case its conf file will decide what port it runs on, a la apache). i think perhaps in OSX the ports are defined in netinfo:

niutil -readprop . /services/ftp port

(or consult netinfo manager).

when inetd catches a request on a port, it uses this services database to decide who gets the request, ftp or ssh or whatever. and like nkuvu says, the default for ftp is 21
 
Can anyone help me please..

I'm trying to setup a FTP on my machine so others can upload and down from my machine well i'm online. For Host ID i assume it's my IP address. but for username and password i'm a bit loss. Surly there is a way without giving out my Admin login, if so... how?

So far i have up and running php & mysql.. for local script testing... they all fully fuctional.

I'm using Mac OS 10.1.3
 
I'm going out on a limb here but I THINK that all they need is your IP address, and your user name... with no password, they shoudl be able to access your "PUBLIC" folder.. and use the Drop Box to drop files to.

You may consider setting up a special user just for that purpose, so that no one can snoop around on your user folder.
 
the way OSX is setup, if someone is going to use ftp to your machine, they have to have an account. so yes, like you say, hostname is your IP. if you are worried about giing them administrative acccess, then create a nonprivileged account, and give them the account name and password.

a more useful solution is to set up anonymous ftp access. to do this is nontrivial. took for a HOWTO or faq, if you can t find one, come back and i will direct you. there should be one here on macosx.com somewhere.

the easiest thing to do is probably just create a new account that is not an admin account, and give away the login and password
 
You could also set up another ftpd like ncftpd, which I use. You can set up virtual users, which exist only to ncftpd. Plus you can set it up so they are locked within a certain directory. www.ncftpd.com .
 
Thx for the Netinfo info, I know the ftp port is 21, just trying to see where the illegal port error would be coming from.

just out of interest anyone know what the ftp-agent (port574), and ftp-data (port20) ports are for?
 
watch out for FTP in Macosx! I had FTP enabled and one of my user accounts got majorly hacked. Some dudes loaded my box up with 6 gigs of DIVX files.... ARRRGGHHHH!

Needless to say, I have it turned off now.
 
I'm assuming you have a fast connection?

Let's see.. with dial-up I can usually transfer about 1MB every 3-5 minutes, 6GB is 6000MB, so we're looking at a minimum of 12.5 days to transfer 6GB. Or about 21 days on the outside of that approximation...


But were they good divx files...? :)
 
I have a fast cable connection.

I didnt watch them before deleting them... they were titled in French, and I was super pissed, so I deleted them before even looking.

I felt so violated. It took me a while to reconfig my firewall, but I'm pretty sure I'm safe now.
 
somebody cracked your OSX ftp account? that is a major security breach, you should figure out what happened and report it. i am very surprised, OSX uses freeBSD ftp (i think), and that is a tried and tested secure ftp server. not that they don t still find holes, but .....


and barrowman, i don t know what ftp-agent is for, but ftp and ftp-data are both used in ftp transfers. ftp (21) is used for controling and setting up a session, and ftp-data is where the actual transfers go.

and i guess i really don t understand what your question is
 
Originally posted by lethe
somebody cracked your OSX ftp account? that is a major security breach, you should figure out what happened and report it. i am very surprised, OSX uses freeBSD ftp (i think), and that is a tried and tested secure ftp server. not that they don t still find holes, but .....

Yes, it was hacked... I did a traceroute on the culprits IP(which i found through using 'last' in a terminal window), but the track busted at 30 jumps... who would i report it to?
 
i don t mean report the intrusion. i mean report the bug in the ftp server. if the ftp server for OSX is vulnerable, that is serious and apple would want it fixed immediately.
 
There are two different kinds of security breach, if I understand correctly.

One, they exploited a hole in a service or a daemon or protocol. Usually things like overflowing buffers and such.

Two, they hacked into an existing account, and had whatever privileges that account had. Examples would be packet sniffing to get passwords and the like.

If it's case two, there really isn't anyone to report it to. You just have to try to make sure your accounts (whether they be users or system accounts) have better password schemes, or you don't use cleartext password transmission.

If it's case one, uh, I dunno. I'm not a security expert... :)
 
You missed my last line. I'm not a security expert... :p

But I'd guess going through your log files.
 
Hint: This is where the other people on the list who are security experts contribute to the thread!
 
Originally posted by nkuvu
Hint: This is where the other people on the list who are security experts contribute to the thread!

very good, nkuvu, very good. i am specifically interested in finding more about packet sniffing and that bit about the password transmission.

i hate to think i practically gave them the keys.
 
Back
Top