On a server with proftpd controlled by xinetd (plesk/centos FWIW), I want to make proftpd listen only on a specific ip address.
I've tried putting bind = 12.34.56.78
in /etc/xinetd.d/ftp_psa
, and also putting DefaultAddress 12.34.56.78
in /etc/proftpd.conf
, but it seems not to work.
After I restart xinetd, nmap shows that port 21 is still being listened on for my other public ip.
Can anyone tell me what I'm doing wrong?
Just as a test I commented out the whole ftp service in the xinetd config file and that did disable the service, so I'm clearly in the right place, but the bind
options seems not to work.
Thanks in advance
UPDATE: config files (munis comments for brevity)
/etc/xinetd.d/ftp_psa
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST AFTER YOU UPGRADE PARALLELS PLESK PANEL.
service ftp
{
flags = IPv6
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
instances = UNLIMITED
server = /usr/sbin/in.proftpd
server_args = -c /etc/proftpd.conf
bind = 12.34.56.78
}
I know it says here not to modify, but I haven't done a plesk upgrade, and I've also tried putting the bind in the defaults section (which has no such warning):
/etc/xinetd.conf
defaults
{
log_type = SYSLOG daemon info
log_on_failure = HOST
log_on_success = PID HOST DURATION EXIT
cps = 50 10
instances = 50
per_source = 10
v6only = no
groups = yes
umask = 002
bind = 12.34.56.78
}
includedir /etc/xinetd.d
And for completeness: /etc/proftpd.conf
ServerIdent off
ServerName "ProFTPD"
ServerType inetd
DefaultServer on
<Global>
DefaultRoot ~ psacln
AllowOverwrite on
</Global>
DefaultTransferMode binary
UseFtpUsers on
TimesGMT off
SetEnv TZ :/etc/localtime
Port 21
DefaultAddress 12.34.56.78
SocketBindTight on
Umask 022
MaxInstances 30
ScoreboardFile /var/run/proftpd/scoreboard
TransferLog /usr/local/psa/var/log/xferlog
<Directory /var/www/vhosts>
GroupOwner psacln
</Directory>
AuthPAM on
AuthPAMConfig proftpd
IdentLookups off
UseReverseDNS off
AuthGroupFile /etc/group