# Setting up Jail in DHCP enviroment, dont understand this part



## mrhobbeys (Jul 18, 2012)

I'm setting up a FreeBSD 9.0 now I want to start setting up my jails, I am confused on what is going to happen if I use DHCP, from my reading I made the notes that I need to take the following steps and should run static IP but I would like to get around the static part because changing the whole network to this model would be a huge pain:

enable gateway mode and set ip.... 


```
echo 'gateway_enable="YES"' >> /etc/rc.conf
echo 'syslogd_enable="YES"'
echo syslogd_flags="-b 192.168.2.10
```

**part of edit**
I think my notes are missing something somewhere I am supposed to tell syslogd to only listen to my lan addapter that I am using xlo. Also might mention this is the first time I have ever worked with jails.
**edit over**

Why can I not just use the hostname?


----------



## fbsd1 (Jul 19, 2012)

Your question is not clear at all. DHCP is used to get the ISP's routable IP that is assigned to your host. You can also run your own DHCP server on your host to issue LAN ip addresses. If you want jails that are only accessed by your local lan them just assign the jail a ip in different range IE: 192.168.5.x
If you want public internet access to jails using a single public routable dynamic ip address then you can have a single application in a jail (such as apache port 80) and as long you donâ€™t run any application on the host using port 80 the jail will service it. The subject of public routable dynamic ip address and DNS has nothing to do with jails. That is a separate problem all together


----------



## lockdoc (Jul 22, 2012)

Do you want your jails to have dynamic IP addresses via a DHCP Server or do you want to have a jailed DHCP?


----------

