Closed port 22 in the jail redirects to the outer system

Arthur Chance freebsd at qeng-ho.org
Wed Dec 7 16:22:39 UTC 2016


On 07/12/2016 15:52, markham breitbach wrote:
> On 2016-12-06 5:24 PM, Bertram Scharpf wrote:
>>
>> How can I make a port 22 request fail if an SSH server is
>> running on the outer machine but not inside the jail?
>>
>>
>>
> By default sshd on the jail host (outer machine) will bind to all
> available addresses.  You can just set the listenAddress for sshd to be
> the IP address that you want it to listen to in /etc/ssh/sshd_config and
> restart sshd.

This is all documented in the "Setting up the Host Environment" section
of the jail(8) man page. It's worth looking at that because other
daemons may be affected.

-- 
Schrödinger's cat had 18 half lives.


More information about the freebsd-questions mailing list