<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Feb 18, 2017 at 10:32 PM, Ian Pilcher <span dir="ltr"><<a href="mailto:arequipeno@gmail.com" target="_blank">arequipeno@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have configured sshd on my firewall to listen only on its internal<br>
IP address.  This is causing it to fail when it first starts, since the<br>
IP address is not actually configured yet.<br>
<br>
I have confirmed that adding network-online.target to the After=... line<br>
in sshd.service file works, but I know that using a drop-in is the<br>
preferred way of doing this.<br>
<br>
I haven't been able to find clear documentation of whether files in the<br>
drop-in directory are "incremental" or not.<br></blockquote><div><br></div><div>All multi-valued parameters are incremental.<br><br></div><div>Alternatively, you could use sshd.socket (socket-activation) with FreeBind=yes -- that way Linux would allow the socket to be bound even if the address isn't configured yet.<br><br>That said... listening only on internal addresses 
doesn't mean the connections will be accepted only from internal 
interfaces -- at least for IPv4, Linux considers the addresses as 
belonging to the whole host, and will still accept connections from any 
interface. (I tested this just a while ago.) So changing the listen-addr is not a good security measure, 
you *still* need the corresponding firewall rules (filtering by source 
IP).<br></div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>