[Proftpd-user] Problem binding to second IP with mod_sftp on 1.3.7a on Ubuntu 21.04
"John Stoffel" <[email protected]> Wed, 7 Jul 2021 10:49:11 -0400
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm trying to setup an ftp/sftp server for our DMZ to replace a realy
ancient one here at work.
I decided to try and use Ubuntu 21.04 as the base image, but I'm
starting to suspect I should drop back to 20.04 LTS instead...
anyway, when I configure two IPs onto the same interface, I can't seem
to make the mod_sftp module bind to only one of them.
Yes, I have openssh only listening on IP addr x.y.z.201, which proftpd
should only be trying to bind to x.y.z.202, but I keep getting errors
like this:
# proftpd -c /etc/proftpd/proftpd.conf -n
2021-07-07 07:07:07,338 ftp-mgmt proftpd[83048]: mod_sql_sqlite/0.4: compiled using SQLite version '3.34.0' headers, but linked to SQLite version '3.34.1' library
2021-07-07 07:07:07,347 ftp-mgmt proftpd[83048] ftp-mgmt: Failed binding to 0.0.0.0, port 22: Address already in use
2021-07-07 07:07:07,347 ftp-mgmt proftpd[83048] ftp-mgmt: Check the ServerType directive to ensure you are configured correctly
2021-07-07 07:07:07,347 ftp-mgmt proftpd[83048] ftp-mgmt: Check to see if inetd/xinetd, or another proftpd instance, is already using 0.0.0.0, port 22
2021-07-07 07:07:07,347 ftp-mgmt proftpd[83048] ftp-mgmt: Unable to start proftpd; check logs for more details
My IP setup looks like this:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:88:37:80 brd ff:ff:ff:ff:ff:ff
altname enp11s0
inet x.y.z.201/24 brd x.y.z.255 scope global ens192
valid_lft forever preferred_lft forever
inet x.y.z.202/24 brd x.y.z.255 scope global secondary ens192
valid_lft forever preferred_lft forever
Note how recent Ubuntu doesn't want you to do 'ens192:1' as the name for the second IP address, since netplan doesn't really support or offer that from what I can see.
So I'm thinking that my problem is the mod_sftp.c wants distinct names for each IP address, otherwise it gets confused.
My configuration is stupid simple, it's just:
<IfModule mod_sftp.c>
<VirtualHost X.Y.Z.202>
Port 22
SFTPEngine ON
SFTPHostKey /var/tmp/ssh/ssh_host_rsa_key
SFTPLog /var/log/proftpd/sftp.log
SFTPCompression delayed
SFTPOptions IgnoreSCPUploadPerms IgnoreSCPUploadTimes IgnoreSFTPSetOwners IgnoreSFTPSetPerms IgnoreSFTPSetTimes IgnoreSFTPUploadPerms
# Where all the customer definitions are
Include /ftp/etc/ftpd.users
</VirtualHost>
</IfModule>
You can see if the error I posted above, it's trying to bind to
0.0.0.0 for some reason. All kinds of tweaks and hacks hasn't fixed
this. I've also tried downgrading to v1.3.6e as well, but it still
doesn't work, giving the same error.
Any hints on how I can debug this and get it working?
John
_______________________________________________
ProFTPD Users List <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html