jail and networking

doug at safeport.com doug at safeport.com
Thu Feb 21 19:00:22 UTC 2013

On Thu, 21 Feb 2013, Shane Ambler wrote:

> It's been a while since I experimented with jails but I'm pretty sure it is 
> the reason I changed my sshd_config
> When you start sshd on the base system by default it binds against 
> and :: which is every ip4 and ip6 address configured on the base system, 
> which includes the aliased ip's for your jails. This is represented by the 
> *:22 from sockstat. When you start the jail it can't start sshd because the 
> base already has that address/port in use.
> In /etc/ssh/sshd_config comment out the ListenAddress and 
> ListenAddress :: then add ListenAddress
> service sshd restart
> start your jail and try again
> The jail config is fine as the jail only sees the one ip address assigned to 
> it.

This is what fixed the problem. From the jail man page, "... The following 
frequently deployed services must have their individual configuration files 
modified to limit the application to listening to a specific IP address ...". It 
then specifically mentions ssh and send mail.

The system I looked at runs seven jails fine without my having made that change. 
I am not sure why I am getting away with this, but I also thank you

More information about the freebsd-questions mailing list