- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to change ftp port
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:09 AM
11-07-2005 02:09 AM
how to change ftp port
I need to change the ftp port in Hpux from 21 to 65530 ... I have chaged in /etc/services and restarted the server ..
but it is now working ..
Please help
Binu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:12 AM
11-07-2005 02:12 AM
Re: how to change ftp port
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l -c 65530
and
inetd -c
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:14 AM
11-07-2005 02:14 AM
Re: how to change ftp port
The ftp daemon "could" have a configuration file where you specify the port that will be used, and depends of the ftp server that is used.
The /etc/services file is used only to "resolve" port-to-name, when you issue commands like netstat.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:29 AM
11-07-2005 02:29 AM
Re: how to change ftp port
The problem still persist ...
I have changed the /etc/inetd.conf and run inetd -c but the problem presist
Thanks
Binu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:31 AM
11-07-2005 02:31 AM
Re: how to change ftp port
The error looks like this
ftp 192.151.103.81
ftp: connect: Connection refused
Thanks
Binu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:39 AM
11-07-2005 02:39 AM
Re: how to change ftp port
Even if you can get the ftpd daemon to listen on another port, how will you get the client to connect on that port?
Face it, ftp is going to be ports 20 & 21 like it always has.
Why would you want to change it? If security is the problem there are better ways to address that then trying to "hide" the ports. Any portscan will find the "new" port(s) anyway.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:39 AM
11-07-2005 02:39 AM
Re: how to change ftp port
(maybe) some significant info stay in
/var/adm/syslog/syslog.log.
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 02:55 AM
11-07-2005 02:55 AM
Re: how to change ftp port
Excerpt from man ftpd
-c ctrlport
-C dataport Overrides the control and the data port numbers
respectively that is used by the daemon.
Normally, the daemon determines the port numbers
by looking in /etc/services (see services(4)) for
"ftp" and "ftp-data". If there is no
/etc/services entry for "ftp-data" and the -C
option is not specified, the daemon uses the port
just prior to the control connection port. The -c
and -C options are both available if running as a
standalone daemon. Otherwise, only the -C option
can be used.
I have missed the standalone portion in the previous post.
Since inetd will not mention that you have changed the port this is not possible while running under inetd.
However if you disable the ftpd service from inetd and run it as a stand alone process from the command line like
/usr/lbin/ftpd -S -l -c 65530
it will work
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 03:09 AM
11-07-2005 03:09 AM
Re: how to change ftp port
Still the problem persisit ...
Thanks
Binu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 03:23 AM
11-07-2005 03:23 AM
Re: how to change ftp port
What OS is that man page snippet from?
I see no such options in either 11.0 nor 11.11 ftpd man pages.
I do see a -c in the ftp man page, but that is for disabling SYST & TYPE commands upon connection. Has nothing to do with the port(s).
Without a rewrite of the ftpd & ftp binaries, I don't see this working - period.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 03:32 AM
11-07-2005 03:32 AM
Re: how to change ftp port
Have you tried from the client side to logon to the particular port you are assigning for FTP i.e 65530 ,
When you try $ ftp 192.151.103.81 it will try to establish a socket conection in port 21, hence try changing the port no, to 65530.
$ telnet 192.151.103.81 65530
Does it work?
You will get a screen like this:
Connected to 192.151.103.81.
Escape character is '^]'.
220 hostname.domain.com FTP server (Version 1.1.214.4(PHNE_29461) Thu Nov 20 06:40:06 GMT 2003) ready.
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 07:06 AM
11-07-2005 07:06 AM
Re: how to change ftp port
ftp
ftp> open 192.168.0.1 65530
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 07:26 AM
11-07-2005 07:26 AM
Re: how to change ftp port
Hope the above will work.
check out this:
$ ftp
ftp>
ftp> open 192.151.103.81 65530
Connected to host
220 FTP server ready.
Name (host:username):
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 12:52 PM
11-07-2005 12:52 PM
Re: how to change ftp port
And _all_ clients connecting to that FTP server will have to specify the other control port number, which can be a bit of bother if there are lots of clients - hence the use of a well-known port number in the first place :)
I have to wonder just why you want to change the port - particularly from being within the reserved range to being beyond the reserved range.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 05:44 PM
11-07-2005 05:44 PM
Re: how to change ftp port
This was from an HP-UX 11.23 system running wuftpd-2.6.1. Please check here http://docs.hp.com/en/B2355-60105/ftpd.1M.html.
I have tested it on this system and it is running without any problems.
To the client end: sure you have to specify the port you want to connect to. This is trivial since you want to change the port.
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 06:12 PM
11-07-2005 06:12 PM
Re: how to change ftp port
run "netstat -an |grep 65530" you can see it's listening.
Please give out the port number 65530 when you run ftp command, instead of using the default.
#ftp
ftp> open x.x.x.x 65530
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2005 10:47 PM
11-07-2005 10:47 PM
Re: how to change ftp port
Just wondering is there any specific reason for changing the ftp port from 21 to 65530. As all clinet need to use the new port number, to use this box as ftp , rather using the default, and can make some confusion.
hth,
Raj.