|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
dhcpd within ezjail?
I've not been able to get dhcpd working properly within a jail. I have a number of other jails setup, but dhcpd doesn't seem to respond to any requests.
It will start up and the process is active in top, etc. When I have another client ask for an address however nothing happens. No output in the logs regarding dhcpd either. I have this in my jail /etc/rc.conf: Code:
## dhcpd options dhcpd_enable="YES" dhcpd_flags="-q" dhcpd_conf="/usr/local/etc/dhcpd.conf" dhcpd_ifaces="hme0" dhcpd_withumask="022" dhcpd_chuser_enable="YES" # runs w/o privileges? dhcpd_withuser="dhcpd" # user name to run as dhcpd_withgroup="dhcpd" # group name to run as dhcpd_chroot_enable="NO" # runs chrooted? dhcpd_devfs_enable="NO" # use devfs if available? #dhcpd_makedev_enable="YES" dhcpd_rootdir="/var/db/dhcpd" dhcpd_includedir="" #dhcpd_jail_enable="YES" dhcpd_hostname="hostname.domain.tld" dhcpd_ipaddress="192.168.0.13" Code:
option domain-name "domain.tld"; option domain-name-servers 192.168.0.13; default-lease-time 600; max-lease-time 7200; authoritative; ddns-update-style none; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.20 192.168.0.29; option domain-name-servers 192.168.0.13; option domain-name "domain.tld"; option routers 192.168.0.1; option broadcast-address 192.168.0.255; default-lease-time 6000; max-lease-time 7200; } |
|
|||
To run a dhcpd in my jail I had to use a custom devfs
[devfsrules_jail_dhcp=5] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'bpf*' unhide add path net unhide add path 'net/*' unhide |
|
|||
Quote:
I was given this link off some one on another mailing list http://markmail.org/message/3dtdyok4hxtb7hou Because I use ezjail the settings are not in rc.conf but in the ezjail configs Code:
cf# more /usr/local/etc/ezjail/thttpd # To specify the start up order of your ezjails, use these lines to # create a Jail dependency tree. See rcorder(8) for more details. # # PROVIDE: standard_ezjail # REQUIRE: # BEFORE: # export jail_thttpd_hostname="thttpd" export jail_thttpd_ip="192.168.1.207" export jail_thttpd_rootdir="/storage/ezjail/thttpd" export jail_thttpd_exec="/bin/sh /etc/rc" export jail_thttpd_mount_enable="YES" export jail_thttpd_devfs_enable="YES" export jail_thttpd_devfs_ruleset="devfsrules_jail_dhcp" export jail_thttpd_procfs_enable="YES" export jail_thttpd_fdescfs_enable="YES" export jail_thttpd_image="" export jail_thttpd_imagetype="" export jail_thttpd_attachparams="" export jail_thttpd_attachblocking="" export jail_thttpd_forceblocking="" Code:
cf# more /etc/devfs.rules [devfsrules_jail_dhcp=5] add include $devfsrules_hide_all add include $devfsrules_unhide_basic add include $devfsrules_unhide_login add path 'bpf*' unhide add path net unhide add path 'net/*' unhide |
|
||||
I see. So, the directive jail_thttpd_ip="192.168.1.207" basically just provides a dummy IP address to fire up the jail? (I say "dummy IP address" because at jail initialization time you're getting a new IP address via dhcp.)
Thanks for the info.
__________________
Kill your t.v. |
|
|||
Hi anomie no the ip 207 is an ip alias which has all ready been added for the jail. The dhcp server is just for the other machines on the lan
|
|
||||
Oof, I can't believe it. This whole thread I thought OP was asking how to set up a jail as a dhcp client. Now that you say it, he's obviously trying to run a dhcp server within the jail.
@zelut: If you read this, sorry - I got the wrong idea about what you're trying to do. terryd's comments should straighten you out.
__________________
Kill your t.v. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dhcpd, vista and wlan | hamba | FreeBSD Ports and Packages | 5 | 8th September 2009 04:34 PM |
dhcpd and dns | sputnik | OpenBSD General | 8 | 8th May 2009 02:50 PM |
ezjail /usr/home users and groups question | neurosis | FreeBSD Security | 7 | 8th September 2008 08:40 PM |
Jails, ezjail, apache, very newbie question. | neurosis | FreeBSD General | 15 | 23rd August 2008 01:38 PM |
help for setting ezjail? | bgobs | FreeBSD General | 13 | 15th June 2008 10:50 AM |