Solved How to configure /etc/hosts correctly

Hi,

I have a very nob questio but here it goes, I have a few jail on my manachine and I have a question in regard to the /etc/hosts file.
On the FreeBSD host, do I add the jail as
Code:
127.0.0.1 webjail
127.0.0.1 dbjail
Or
Code:
10.8.20.10 webjail
10.8.20.11 dbjail
10.8.20.10 and 10.8.20.11 is the ip on lo1 cloned interface.

Do I need to add them again inside the jail?
On the webjail, do I need to add the domain name to the list?
Code:
10.8.20.10 webjail www.mydomain.com dev.mydomain.com

Thank you
 
Hi,

I have a very nob questio but here it goes, I have a few jail on my manachine and I have a question in regard to the /etc/hosts file.
On the FreeBSD host, do I add the jail as
Code:
127.0.0.1 webjail
127.0.0.1 dbjail
Or
Code:
10.8.20.10 webjail
10.8.20.11 dbjail
10.8.20.10 and 10.8.20.11 is the ip on lo1 cloned interface.
The latter. How you said, 10.8.20.10 and 10.8.20.11 are the IP addresses assigned to the interface (lo1) of your jails.
Do I need to add them again inside the jail?
On the webjail, do I need to add the domain name to the list?
Code:
10.8.20.10 webjail www.mydomain.com dev.mydomain.com

Thank you
No, unless you want your jail being able to resolve that hostname (i.e. webjail) by itself.
 
Back
Top