Re: [Proftpd-user] Problem binding to second IP with mod_sftp on 1.3.7a on Ubuntu 21.04
"John Stoffel" <[email protected]> Thu, 8 Jul 2021 21:12:11 -0400
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "TJ" == TJ Saunders <[email protected]> writes: >> 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: >> >> 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? TJ> First, there is the "default" server config in any ProFTPD TJ> configuration; this is what is probably binding to 0.0.0.0. To TJ> disable this, outside of your mod_sftp configuration section, add: TJ> # Disable the default server config section TJ> Port 0 I already had this. TJ> # To reduce surprise, tell the default server config to bind only to localhost TJ> DefaultAddress 127.0.0.1 But not this. Duh! Probably time to file an Ubuntu bug report asking for this to be part of the default configuration. TJ> In addition, to get ProFTPD to not bind to the wildcard address, TJ> and instead to bind only to the specified addresses, you can use: TJ> SocketBindTight on Why isn't this the default? I would think that binding to all interfaces by default is just nasty... or maybe put in another warning in the code what mentions this on startup. TJ> See: TJ> http://www.proftpd.org/docs/modules/mod_core.html#SocketBindTight TJ> Hope this helps, It does, it sure does! Now I feel stupid for not reading and re-reading the docs more carefully. Thanks! John _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html