Gentoo Archives: gentoo-user

From: "Matt Connell (Gmail)" <matthewdconnell@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Configure sshd to listen on specific interfaces?
Date: Thu, 27 Aug 2020 15:07:23
Message-Id: f765e590e2026cb476c59b5a9d9c7a03c9b31e7c.camel@gmail.com
In Reply to: Re: [gentoo-user] Configure sshd to listen on specific interfaces? by Victor Ivanov
1 On Thu, 2020-08-27 at 15:48 +0100, Victor Ivanov wrote:
2 > On 27/08/2020 14:40, Grant Edwards wrote:
3 > > I do _not_ want it to listen on 0.0.0.0.
4 > >
5 > > I want it to listen on 127.0.0.1 and on whatever IP addresses are
6 > > assigned to two specified interfaces.
7 >
8 > As far as I'm aware, I don't think OpenSSH allows for listening on a
9 > specific interface.
10
11 This is my understanding as well.
12
13 Were I in your situation, I think my somewhat ham-fisted approach would
14 be to write a script to edit sshd_config and restart the service, using
15 a dhcpcd hook to run it after the interface comes up. Not really
16 elegant but I feel it might be simpler than the netfliter solution.