Page 2 of 2
Re: help with Jails
Posted: 29 Oct 2012 10:09
by alexey123
YES, Nas4Free webGui use 80, so I redirect owncloud to 81
Hmmm, your nas have ip=192.168.1.17, your jail have ip=192.168.1.201. Your webserver must work on 80 port.
But I not use webgui on standart port - I define it into port over 10000
Re: help with Jails
Posted: 29 Oct 2012 11:11
by raulfg3
It's a bug that report fsbruva to developers, if I use standar port 80 when I type 192.168.1.201 in explorer I load Nas4Free WebGui ( because the bug that webgui ear in all IP's), of course if I use other port in Nas4Free Webgui ( like 8080 or other), this do not happens.
PD: Really actually is not a limitation for me .
Re: help with Jails
Posted: 29 Oct 2012 11:45
by alexey123
I post how to add ipfw_nat
Re: help with Jails
Posted: 29 Oct 2012 16:01
by raulfg3
thanks.
I still need help of how to edit fstab.proto to add my files.
I actually have /mnt/NAS-A/Video , /mnt/NAS-A/Fotos , /mnt/NAS-A/Musica and I want to use in owncloud and in minidlna (YES I Install minidlna but actually don't share because I still do not configure folders to share).
Re: help with Jails
Posted: 29 Oct 2012 18:36
by alexey123
raulfg3 wrote:thanks.
I still need help of how to edit fstab.proto to add my files.
I actually have /mnt/NAS-A/Video , /mnt/NAS-A/Fotos , /mnt/NAS-A/Musica and I want to use in owncloud and in minidlna (YES I Install minidlna but actually don't share because I still do not configure folders to share).
Try create as nas4free root into jail native location, for example
/mnt/NAS-A/jail/proto/mnt,
I don't know valid path, folders Video, Musica, Fotos
Code: Select all
nas4free:# mkdir /mnt/NAS-A/jail/proto/mnt/{Video,Musica,Fotos}
And add to startup script before
#start all jails point
#Create mounts
mount_nullfs /mnt/NAS-A/Musica /jail/proto/mnt/Musica
mount_nullfs /mnt/NAS-A/Fotos /jail/proto/mnt/Fotos
mount_nullfs /mnt/NAS-A/Video /jail/proto/mnt/Video
#start all jails
/etc/rc.d/jail start
Red colour - added lines.
Reboot and under jail check
I check on my home NAS about port.
Nas4free webserver work on port 80 and jail webserver work on port 80. Without problems.
Re: help with Jails
Posted: 30 Oct 2012 16:41
by fsbruva
alexey123 wrote:
Nas4free webserver work on port 80 and jail webserver work on port 80. Without problems.
But you have ipfw_nat loaded, correct? If you check the /var/etc/lighttpd.conf, you see that the listen port is 80. By default, lighttpd will process web requests for ALL ip addresses. Since ifconfig at the host prompt shows all the jail ip's, then the web gui shows up for all addresses for me. However - I didn't try it following a reboot of the N4F host.
Re: help with Jails
Posted: 30 Oct 2012 16:45
by fsbruva
alexey123 wrote:
But in laboratory I have full - install and I want jail, running properly. My problem - sometimes, one per 30-40 reboots, I need fsck drive, when placed jail.
I will try it out on a full install, to see. But I have a few thoughts -
If you are getting a problem every 30-40 reboots, then that problem should not surface for at least 15 years.

Or, you are rebooting far too frequently.
Also, I thought we already established that your jail setup was problematic due to your iSCSI disk connection. I doubt I will have any trouble with a VM that has non-IP hard disks.
Re: help with Jails
Posted: 30 Oct 2012 17:38
by alexey123
fsbruva wrote:But you have ipfw_nat loaded, correct?
Not. I load only accf_http.ko for apache
If you check the /var/etc/lighttpd.conf, you see that the listen port is 80. By default, lighttpd will process web requests for ALL ip addresses. Since ifconfig at the host prompt shows all the jail ip's, then the web gui shows up for all addresses for me. However - I didn't try it following a reboot of the N4F host.
How many virtual hosts can have Apache or lighttpd? Only RAM-size is limit. Webserver listen port 80, but hostname and ip different from jail.
If you are getting a problem every 30-40 reboots, then that problem should not surface for at least 15 years. Or, you are rebooting far too frequently.
All need work as wrote in manual. If we begin jail env, we need create clean way to built it for another peoples.
Also, I thought we already established that your jail setup was problematic due to your iSCSI disk connection.
iSCSI work perfect 3 last versions, I compile BSDMC for x86 and amd64 on diskless freebsd, booted from iscsi.
This was test machines. I have attic mobo for n4f server and not have normal harddisks - only one, attached to server. And all my experiments I make over iSCSI disk image with different mobo.
I was test Virtual box on XP, on Ubuntu - it slowly twice then my old mobo x86-full on Intel(R) Pentium(R) 4 CPU 1500MHz / 427MB .
Re: help with Jails
Posted: 30 Oct 2012 18:10
by raulfg3
alexey123 wrote:I post how to add ipfw_nat
Sorry I don't see how to add ipfw_nat , only a request to developers to add it into Nas4Free.
It's the link correct ?.
Re: help with Jails
Posted: 30 Oct 2012 19:19
by alexey123
raulfg3 wrote:
Sorry I don't see how to add ipfw_nat , only a request to developers to add it into Nas4Free.
It's the link correct ?.
All correct. You can extract modules ipfw_nat.ko and libalias.ko from FreeBSD install disk, or download kernel.txz and extract it from
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 4/9.1-RC2/ for amd64 or
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 6/9.1-RC2/ for x86.
You need put its into /boot/modules folder.
But when I add modules, I have trouble with memory, state 1 on picture. Cpu load not normal and memory usage not normal also.

Need recompile kernel, I +1 for request before
Re: help with Jails
Posted: 11 Nov 2012 22:29
by maddes
fsbruva wrote:
I am in the process of documenting ezjail-admin script (so I can understand his methods), and then move them into php. The trouble is his method uses freebsd-update, which is run from the N4F host. This is not part of the normal N4F install, and depends on numerous other binaries to run. Because I would like my solution to be simpler, I will be implementing the ezjail methods in php. ...
I'm going to have a look at qjail, which is very similar to ezjail in use.
Re: help with Jails
Posted: 27 Jan 2013 08:59
by alexey123
fsbruva wrote:alexey123 wrote:
Nas4free webserver work on port 80 and jail webserver work on port 80. Without problems.
If you check the /var/etc/lighttpd.conf, you see that the listen port is 80. By default, lighttpd will process web requests for ALL ip addresses. Since ifconfig at the host prompt shows all the jail ip's, then the web gui shows up for all addresses for me. However - I didn't try it following a reboot of the N4F host.
I find good idea. Enable
lighttpd to listen only one IP you can add to Auxiliary parameters windows only one line
For SSH Etra options windows
For
rsync server Auxiliary parameters window
___________________________________________________________________________________
But troubles with ftp server, smb, and NFS.
NFS as wrote here need to understand line nfs_server_flags = "-u -t -n 4 -h 10.0.0.1", but not work for me
UPD - on fuul version I repair it.
I edit /etc/rc.d/nfsd in line 28
nfs_server_flags=`/usr/local/bin/xml sel -t -v "concat('-u -h 10.0.0.1 -t -n ',//nfsd/numproc)" ${configxml_file} | /usr/local/bin/xml unesc`
Where 10.0.0.1 my LAN ip.
For smb and netbios I add aux parameters
Code: Select all
socket address = 10.0.0.1
interfaces = 10.0.0.1/24
ProFtpd
In file /etc/rc.d/proftpd I find line 129
-v "concat('DefaultAddress ',//system/hostname)" -n \
This line prevent to change Listen adress. I dont know replace it and temporary I'll use firewall
Code: Select all
deny log logamount 5 ip from any 21 to 10.0.0.5 dst-port 21 via re0