8.1 to 8.2 upgrade, apache SSL Certificates problem

2011-03-23 Thread n dhert
Hi,

I did an upgrade from FreeBSD 8.1 to 8.2 today. All OK so far, except for
Apache (apache-2.2.17_1)
It wouldn't start.
 /var/log/httpd-error.log
[Wed Mar 23 13:04:26 2011] [error] Server should be SSL-aware but has no
certificate configured [Hint: SSLCertificateFile] ((null):0)

I dit not change anything tot my apache config in the last weeks (and have
restarted apache, via apachectl graceful several
times). My certificates are still there and did not change. Accessing some
of my https enabled virtual hosts worked
before the upgrade.

# apachectl configtest
Suntax OK

If I start apache without SSL (commenting out the Include
etc/apache22/extra/httpd-ssl.conf line in
/usr/local/etc/apache22/httpd.conf),
then apache starts.

Waht can be the cause, it worked before 8.2 ??
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Bandwith Management

2011-03-23 Thread Eric Beukes
Could you please assist me.

 

I have a freebsd box the previous person who handled it left the
company.

 

Now we increased the bandwidth with tenet now how do I increase it on my
freebsd box?

 

As well as how do I now what is actually used for the management of the
bandwith like ipfw, ect?

 

Please let me know 

 

Thank you,

 

Eric Beukes



-
This e-mail is subjected to the disclaimer that can be viewed at:
* http://www.cut.ac.za/www/disclaimer/email_disclaimer
-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Solved - 8.1 to 8.2 upgrade, apache SSL Certificates problem

2011-03-23 Thread n dhert
Don't border,
i found the error, nothing to with freebsd. sorry

2011/3/23 n dhert ndhert...@gmail.com

 Hi,

 I did an upgrade from FreeBSD 8.1 to 8.2 today. All OK so far, except for
 Apache (apache-2.2.17_1)
 It wouldn't start.
  /var/log/httpd-error.log
 [Wed Mar 23 13:04:26 2011] [error] Server should be SSL-aware but has no
 certificate configured [Hint: SSLCertificateFile] ((null):0)

 I dit not change anything tot my apache config in the last weeks (and have
 restarted apache, via apachectl graceful several
 times). My certificates are still there and did not change. Accessing some
 of my https enabled virtual hosts worked
 before the upgrade.

 # apachectl configtest
 Suntax OK

 If I start apache without SSL (commenting out the Include
 etc/apache22/extra/httpd-ssl.conf line in
 /usr/local/etc/apache22/httpd.conf),
 then apache starts.

 Waht can be the cause, it worked before 8.2 ??




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bandwith Management

2011-03-23 Thread Ryan Coleman
Do you know exactly what they used to limit the bandwidth? was it IPFW or 
something else?

On Mar 23, 2011, at 8:49 AM, Eric Beukes wrote:

 Could you please assist me.
 
 
 
 I have a freebsd box the previous person who handled it left the
 company.
 
 
 
 Now we increased the bandwidth with tenet now how do I increase it on my
 freebsd box?
 
 
 
 As well as how do I now what is actually used for the management of the
 bandwith like ipfw, ect?
 
 
 
 Please let me know 
 
 
 
 Thank you,
 
 
 
 Eric Beukes
 
 
 
 -
 This e-mail is subjected to the disclaimer that can be viewed at:
 * http://www.cut.ac.za/www/disclaimer/email_disclaimer
 -
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


why does this simple counter fail?

2011-03-23 Thread Gary Kline

Guys,

Can any of you php hackers tell me why this simple self-hacked
counter bomb?

appended.

tia.

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org

!--
//
//  $Id: count.php,v 1.2 2004/01/22 21:58:48 kline Exp kline $
//
--!

?php

$directory=./countdir/;

if (! (file_exists( ($directory.$file)) ))
{
if (! ($fp = fopen( ($directory.$file), w)) )
{
echo Can't create file '$directory.$file';
exit(1);
}
else
{
fseek($fp,0);
fputs($fp, $count);
fputs($fp, \n);
fputs($fp, $file);
fclose($fp);
}
}

if (file_exists( ($directory.$file)))
{
$fp = fopen($directory.$file, r+);
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
fputs($fp, $count);
fputs($fp, \n);
fputs($fp, $file);

flock($fp, 3);
fclose($fp);
?

CENTER
FONT COLOR=#66  !---  rich dark bluegrey ---
FONT SIZE=2

?
print  there have been ;
?

FONT SIZE=+1
FONT COLOR=#FF

?
print $count;
?

/FONT
/FONT
?
print hits\n;
?

/CENTER

?

} 
else
{
print Can't find file, check '$directory.$file'\n;
}

?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-23 Thread Ryan Coleman
Do you have an error for it?

If not... add after the first ?
error_reporting(9);

And see what it reports.

--
Ryan
PHP dev.


On Mar 23, 2011, at 11:45 AM, Gary Kline wrote:

 
   Guys,
 
   Can any of you php hackers tell me why this simple self-hacked
   counter bomb?
 
   appended.
 
   tia.
 
 -- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org
 
 !--
 //
 //$Id: count.php,v 1.2 2004/01/22 21:58:48 kline Exp kline $
 //
 --!
 
 ?php
 
 $directory=./countdir/;
 
 if (! (file_exists( ($directory.$file)) ))
 {
   if (! ($fp = fopen( ($directory.$file), w)) )
   {
   echo Can't create file '$directory.$file';
   exit(1);
   }
   else
   {
   fseek($fp,0);
   fputs($fp, $count);
   fputs($fp, \n);
   fputs($fp, $file);
   fclose($fp);
   }
 }
 
 if (file_exists( ($directory.$file)))
 {
$fp = fopen($directory.$file, r+);
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
   fputs($fp, $count);
   fputs($fp, \n);
fputs($fp, $file);
 
flock($fp, 3);
fclose($fp);
 ?
 
   CENTER
   FONT COLOR=#66  !---  rich dark bluegrey ---
   FONT SIZE=2
 
 ?
print  there have been ;
 ?
 
   FONT SIZE=+1
   FONT COLOR=#FF
 
 ?
 print $count;
 ?
 
   /FONT
   /FONT
 ?
 print hits\n;
 ?
 
   /CENTER
 
 ?
 
 } 
 else
 {
print Can't find file, check '$directory.$file'\n;
 }
 
 ?
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-23 Thread Ryan Coleman
On a side note, I'd nix $count += 1;
for 
$count++;


--
ryan

On Mar 23, 2011, at 11:45 AM, Gary Kline wrote:

 
   Guys,
 
   Can any of you php hackers tell me why this simple self-hacked
   counter bomb?
 
   appended.
 
   tia.
 
 -- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.98a release of Jottings: http://jottings.thought.org
 
 !--
 //
 //$Id: count.php,v 1.2 2004/01/22 21:58:48 kline Exp kline $
 //
 --!
 
 ?php
 
 $directory=./countdir/;
 
 if (! (file_exists( ($directory.$file)) ))
 {
   if (! ($fp = fopen( ($directory.$file), w)) )
   {
   echo Can't create file '$directory.$file';
   exit(1);
   }
   else
   {
   fseek($fp,0);
   fputs($fp, $count);
   fputs($fp, \n);
   fputs($fp, $file);
   fclose($fp);
   }
 }
 
 if (file_exists( ($directory.$file)))
 {
$fp = fopen($directory.$file, r+);
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
   fputs($fp, $count);
   fputs($fp, \n);
fputs($fp, $file);
 
flock($fp, 3);
fclose($fp);
 ?
 
   CENTER
   FONT COLOR=#66  !---  rich dark bluegrey ---
   FONT SIZE=2
 
 ?
print  there have been ;
 ?
 
   FONT SIZE=+1
   FONT COLOR=#FF
 
 ?
 print $count;
 ?
 
   /FONT
   /FONT
 ?
 print hits\n;
 ?
 
   /CENTER
 
 ?
 
 } 
 else
 {
print Can't find file, check '$directory.$file'\n;
 }
 
 ?
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bandwith Management

2011-03-23 Thread Odhiambo Washington
On Wed, Mar 23, 2011 at 16:49, Eric Beukes ebeu...@cut.ac.za wrote:

 Could you please assist me.



 I have a freebsd box the previous person who handled it left the
 company.



 Now we increased the bandwidth with tenet now how do I increase it on my
 freebsd box?



 As well as how do I now what is actually used for the management of the
 bandwith like ipfw, ect?



 Please let me know



For starters, could you please show what's in /etc/rc.conf?



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Damn!!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-23 Thread Paul Macdonald

On 23/03/2011 16:45, Gary Kline wrote:

Guys,

Can any of you php hackers tell me why this simple self-hacked
counter bomb?

appended.

tia.

$file doesn't look to be set anywhere

if its a web script ( as opposed to cmd line cli) tyhen its probably 
passed as a POST or GET variable.,


register_globals needs to be on for this variable to be auto set,

if the form is submitted via POST,  change script to:

$directory=./countdir/;
$file=$_POST['file'];


if the form is submitted via GET (you'd see the file=variable in the address 
bar),  change script to:

$directory=./countdir/;
$file=$_GET['file'];


Of course you want to sanitise this $file variable so that it can't be hacked.



--
-
Paul Macdonald
IFDNRG Ltd
Web and video hosting
-
t: 0131 5548070
m: 07534206249
e: p...@ifdnrg.com
w: http://www.ifdnrg.com
-
IFDNRG
40 Maritime Street
Edinburgh
EH6 6SA
-


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-23 Thread Ryan Coleman


On Mar 23, 2011, at 12:14 PM, Paul Macdonald wrote:

 On 23/03/2011 16:45, Gary Kline wrote:
  Guys,
 
  Can any of you php hackers tell me why this simple self-hacked
  counter bomb?
 
  appended.
 
  tia.
 $file doesn't look to be set anywhere
 
 if its a web script ( as opposed to cmd line cli) tyhen its probably passed 
 as a POST or GET variable.,
 
 register_globals needs to be on for this variable to be auto set,
 
 if the form is submitted via POST,  change script to:
 
 $directory=./countdir/;
 $file=$_POST['file'];
 
 
 if the form is submitted via GET (you'd see the file=variable in the address 
 bar),  change script to:
 
 $directory=./countdir/;
 $file=$_GET['file'];
 
 
 Of course you want to sanitise this $file variable so that it can't be hacked.

Additionally you could do:

$file = $_SERVER['PHP_SELF'];

Which will tie the filename to the actual PHP file.

But you might want to do something like...

$file = urlencode($_SERVER['REQUEST_URI'])..txt;

to make it the full url, safe vars for file names and add .txt to make it 
readable in other things not 
FreeBSD.___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bandwith Management

2011-03-23 Thread Michael J. Kearney
The isp takes it to the dmarc after that its up to you. You could make a 
phonecall and find out where the dsu / csu us at.

Eric Beukes ebeu...@cut.ac.za wrote:


Could you please assist me.



I have a freebsd box the previous person who handled it left the
company.



Now we increased the bandwidth with tenet now how do I increase it on my
freebsd box?



As well as how do I now what is actually used for the management of the
bandwith like ipfw, ect?



Please let me know



Thank you,



Eric Beukes



-

This e-mail is subjected to the disclaimer that can be viewed at:

* http://www.cut.ac.za/www/disclaimer/email_disclaimer

-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: why does this simple counter fail?

2011-03-23 Thread Frédéric Perrin
Gary Kline kl...@thought.org writes:
   Can any of you php hackers tell me why this simple self-hacked
   counter bomb?

As others said, what does 'this simple counter bomb' means?

 $fp = fopen($directory.$file, r+);
 flock($fp, 1);

You want an exclusive lock (LOCK_EX, which is 2 is you use some ancient
PHP), not a shared lock.

When updating the file:
 fputs($fp, $count);
 fputs($fp, \n);
 fputs($fp, $file);

Why do you feel the need to store the filename inside the file itself?
You don't seem to need it after.

-- 
Frédéric Perrin -- http://tar-jx.bz

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Automating mounting of ISO images

2011-03-23 Thread Ryan Coleman
I have a folder full of ISOs that we're sharing on the network instead of 
having the discs available (seems like a good idea, right?)

But I want to automate the process on boot instead of having to write a static 
script  to do the work.

Disc images are located in /mount/disc_images/ (all are ISOs)
They need to mount into /mount/office_files/images/FILENAME [without the .iso 
extension]

How can I do this? I've always been given these types of scripts in the past at 
an old job but I don't have access to those examples anymore.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


FreeBSD-based hosting

2011-03-23 Thread Австин Ким
Hi, all,

I happened to come across this Netcraft survey of the Most Reliable Hosting 
Company Sites in February 2011 (the most recent month for which statistics are 
available):
http://news.netcraft.com/archives/2011/03/01/most-reliable-hosting-company-sites-in-february-2011.html
I was surprised that the top three most reliable sites for last month were all 
running FreeBSD :O

I'm currently using a Linux-based hosting provider but am interested in 
migrating to a FreeBSD-based provider for two reasons:  (1) I develop on a 
system running FreeBSD, so it would make things simpler for me if the servers 
whereon my site ran did also, and (2) I'd like to migrate to using FreeBSD 
counterparts in lieu of Linux standbys (e. g., pf instead of iptables, etc.)  
Can anyone recommend the best FreeBSD-based hosting provider that they've used 
recently and/or are currently using, in terms of:

(a) providing dedicated servers, or, at the very least, true VPSes (i. e., one 
you can hard-reboot at whim, not a FreeBSD jail), obviously with full root 
access;
(b) connection latency (how long it takes to connect via ssh/sftp) and 
speed/lag;
(c) observed disk/file I/O performance (both latency and throughput, 
particularly important in the case of VPSes -- my current Linux VPS-based 
service started out great, but now file I/O performance has slowed to a crawl 
as they've added VPSes without proportionately increasing hardware resources);
(d) cost-effectiveness (i. e., how much you get for somewhere on the order of 
$100 a month -- I'm interested in setting up a small, experimental WWW site, 
and then hope to scale up from there);
(e) preferably a hosting provider that delivers a dedicated or virtual server 
with a fresh, clean install of the most recent release of FreeBSD (8.2-RELEASE 
as of the time of this writing) right off the bat; and
(f) in case of ties, the extent to which they've given back to the FreeBSD 
community, either through contributed code or hardware, hosting, and/or 
financial support?

My first instinct was simply to choose a hosting provider based on the Netcraft 
survey above, but since I can't assess the other criteria based on the Netcraft 
survey alone I figured I'd be best off going with what y'all recommend based on 
your personal and technical experience with all factors taken into 
consideration, not just pure reliability according to a single metric.  (Note:  
I know this subject resurfaces from time to time in the FreeBSD mailing lists 
and fora, but I'd like to ask anew as the quality of hosting companies' 
services varies so quickly as they jostle for market position.)

Thanks in advance, everyone, and my apologies for asking a commercial-type 
question, rather than a purely technical one.  (And please, no ads or 
self-promotion in reply; let's just all agree upfront to boycott any poster 
that violates this basic rule of common courtesy :)

All the best,
Austin

P. S.  If you recommend hosting providers based outside of the U. S. or Russian 
Federation I'd appreciate it if you could restrict yourself to those who have a 
solid track record of handling secure transactions in USD and whose sites and 
documentation are available in English or Russian.  Thanks!

P. P. S.  Please reply to the list, not to me personally.
--
Все возможности @Mail.Ru в твоем мобильном.
Просто зайди с телефона на m.mail.ru___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: FreeBSD-based hosting

2011-03-23 Thread Randal L. Schwartz
 Австин == Австин Ким avs...@mail.ru writes:

Австин Can anyone recommend the best FreeBSD-based hosting provider
Австин that they've used recently and/or are currently using, in terms
Австин of:

You might want to check the archives for this mailing list.  This
question gets asked and answered repeatedly. :)

I'll once again say how happy I am with http://arpnetworks.com/vps.
Check them out.  Tell 'em I sent ya.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Chuck Swiger
Hi--

On Mar 23, 2011, at 11:49 AM, Ryan Coleman wrote:
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME [without the .iso 
 extension]
 
 How can I do this? I've always been given these types of scripts in the past 
 at an old job but I don't have access to those examples anymore.

Something like this might do (untested, though):

#! /bin/sh  


for FILE in /mount/disc_images/*; do
   DEST=$FILE:r
   mount -t cd9660 /dev/`mdconfig -f ${FILE}` /mount/office_files/images/${DEST}
done

Might need to add quotes if you have spaces or other unusual characters in your 
ISO filenames

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 13:49:46 -0500, Ryan Coleman edi...@d3photography.com 
wrote:
 I have a folder full of ISOs that we're sharing on the
 network instead of having the discs available (seems 
 like a good idea, right?)

Please use the correct terminology: FreeBSD (as any UNIX
operating systems) calls them DIRECTORIES. Folders is
something else, it's not equivalent to a directory, so
folders is wrong.



 But I want to automate the process on boot instead of
 having to write a static script  to do the work.
 
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME
 [without the .iso extension]
 
 How can I do this? I've always been given these types of
 scripts in the past at an old job but I don't have access
 to those examples anymore.

Something like this (not even tested, but quite verbose and
unelegant) should work:

#!/bin/sh
NODE=0
for IMAGE in /mount/disc_images/*.iso; do
mdconfig -a -t vnode -u $NODE -f $IMAGE
mount -t cd9660 -o ro /dev/md$NODE /mount/office_files/images/`basename 
$IMAGE .iso`
NODE=`expr $NODE + 1`
done

This of course assumes that you have PROPER file names. In
case the ISO file names contain special characters, attention
has to be paid for quoting and escaping. Worth reading:

http://www.dwheeler.com/essays/filenames-in-shell.html

http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html

After reading it, you'll easily recognize that I did it wrong
in the suggestive script. :-)



I'm not sure if you can mount from ISO files directly, but
maybe you can try that too.

Remember unmounting the files when not in use (scripted: umount
and mdconfig -d).




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/23/11 2:49 PM, Ryan Coleman wrote:
 I have a folder full of ISOs that we're sharing on the network instead of 
 having the discs available (seems like a good idea, right?)
 
 But I want to automate the process on boot instead of having to write a 
 static script  to do the work.
 
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME [without the .iso 
 extension]
 
 How can I do this? I've always been given these types of scripts in the past 
 at an old job but I don't have access to those examples anymore.

Hi Ryan,

You can put something like this in /etc/rc.conf to get the device files
created automatically:

mdconfig_md0=-t vnode -f /mount/disc_images/Image1.iso
mdconfig_md1=-t vnode -f /mount/disc_images/Image2.iso
mdconfig_md2=-t vnode -f /mount/disc_images/Image3.iso

Because these devices (/dev/md0, /dev/md1, /dev/md2) will be created
before /etc/fstab is processed, you can then add the following entries
in that file:

/dev/md0/mount/office_files/images/Image1cd9660ro00
/dev/md1/mount/office_files/images/Image2cd9660ro00
/dev/md2/mount/office_files/images/Image3cd9660ro00

Check out the rc(8) man page (http://bit.ly/fuwn5n) for more information
about how the startup scripts work, as well as the one that processes
the device creation directives above - /etc/rc.d/mdconfig

Finally, you can always add your own custom startup scripts to
/usr/local/etc/rc.d if you need to do something that the standard
startup scripts can't handle.

Hope that helps,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2KTn4ACgkQ0sRouByUApCAiwCfZzO8jnaKIFxuOoZotU8Ac49I
MMIAni1KMFDqLe1YeMaS/LZUsgrV1PfY
=JUk3
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: FreeBSD-based hosting

2011-03-23 Thread Nathan Vidican
On Wed, Mar 23, 2011 at 2:51 PM, Австин Ким avs...@mail.ru wrote:

 Hi, all,

 I happened to come across this Netcraft survey of the Most Reliable
 Hosting Company Sites in February 2011 (the most recent month for which
 statistics are available):

 http://news.netcraft.com/archives/2011/03/01/most-reliable-hosting-company-sites-in-february-2011.html
 I was surprised that the top three most reliable sites for last month were
 all running FreeBSD :O

 I'm currently using a Linux-based hosting provider but am interested in
 migrating to a FreeBSD-based provider for two reasons:  (1) I develop on a
 system running FreeBSD, so it would make things simpler for me if the
 servers whereon my site ran did also, and (2) I'd like to migrate to using
 FreeBSD counterparts in lieu of Linux standbys (e. g., pf instead of
 iptables, etc.)  Can anyone recommend the best FreeBSD-based hosting
 provider that they've used recently and/or are currently using, in terms of:

 (a) providing dedicated servers, or, at the very least, true VPSes (i. e.,
 one you can hard-reboot at whim, not a FreeBSD jail), obviously with full
 root access;
 (b) connection latency (how long it takes to connect via ssh/sftp) and
 speed/lag;
 (c) observed disk/file I/O performance (both latency and throughput,
 particularly important in the case of VPSes -- my current Linux VPS-based
 service started out great, but now file I/O performance has slowed to a
 crawl as they've added VPSes without proportionately increasing hardware
 resources);
 (d) cost-effectiveness (i. e., how much you get for somewhere on the order
 of $100 a month -- I'm interested in setting up a small, experimental WWW
 site, and then hope to scale up from there);
 (e) preferably a hosting provider that delivers a dedicated or virtual
 server with a fresh, clean install of the most recent release of FreeBSD
 (8.2-RELEASE as of the time of this writing) right off the bat; and
 (f) in case of ties, the extent to which they've given back to the FreeBSD
 community, either through contributed code or hardware, hosting, and/or
 financial support?

 My first instinct was simply to choose a hosting provider based on the
 Netcraft survey above, but since I can't assess the other criteria based on
 the Netcraft survey alone I figured I'd be best off going with what y'all
 recommend based on your personal and technical experience with all factors
 taken into consideration, not just pure reliability according to a single
 metric.  (Note:  I know this subject resurfaces from time to time in the
 FreeBSD mailing lists and fora, but I'd like to ask anew as the quality of
 hosting companies' services varies so quickly as they jostle for market
 position.)

 Thanks in advance, everyone, and my apologies for asking a
 commercial-type question, rather than a purely technical one.  (And
 please, no ads or self-promotion in reply; let's just all agree upfront to
 boycott any poster that violates this basic rule of common courtesy :)

 All the best,
 Austin

 P. S.  If you recommend hosting providers based outside of the U. S. or
 Russian Federation I'd appreciate it if you could restrict yourself to those
 who have a solid track record of handling secure transactions in USD and
 whose sites and documentation are available in English or Russian.  Thanks!

 P. P. S.  Please reply to the list, not to me personally.
 --
 Все возможности @Mail.Ru в твоем мобильном.
 Просто зайди с телефона на m.mail.ru
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org



+1 vote for Arp Networks - I've been a happy customer with them for a couple
of years now. Their VPS offerings scale very well, and they give you full
remote console access including the ability to 'poweroff' and restart your
VPS. The control panel is simple, and their support has been good. Their
network has caused no problems for me personally, though I don't know what
kind of latency you might incur from Russia. I figure it's worth trying at
least, they do not lock you into a contract and you can usually get a new
VPS up within a day to be able to mess with it yourself.

-- 
Nathan Vidican
nat...@vidican.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Ryan Coleman
We're close on this (thanks for the push).

It wants to load the entire path up in ${DEST} which is not ideal but I can 
live with that.

I am also trying to make the directories right before the attempt to mount the 
image (a 'duh' moment just now). 
So I'd like to have just the filename, not the full path, made as a folder... 

In other news: The ISOs are all made by me, so no special chars, just capital 
and lowercase letters, sometimes numbers, no spaces and use of underscores and 
hyphens.

thanks!


On Mar 23, 2011, at 2:11 PM, Chuck Swiger wrote:

 Hi--
 
 On Mar 23, 2011, at 11:49 AM, Ryan Coleman wrote:
 Disc images are located in /mount/disc_images/ (all are ISOs)
 They need to mount into /mount/office_files/images/FILENAME [without the 
 .iso extension]
 
 How can I do this? I've always been given these types of scripts in the past 
 at an old job but I don't have access to those examples anymore.
 
 Something like this might do (untested, though):
 
 #! /bin/sh
   
 
 for FILE in /mount/disc_images/*; do
   DEST=$FILE:r
   mount -t cd9660 /dev/`mdconfig -f ${FILE}` 
 /mount/office_files/images/${DEST}
 done
 
 Might need to add quotes if you have spaces or other unusual characters in 
 your ISO filenames
 
 Regards,
 -- 
 -Chuck
 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Kodak C195 digital camera appears to affect WD on usb

2011-03-23 Thread Steven Friedrich
I know I wasn't clear in my original mail, but after this AutoSense failed, I 
get LOTS of g_vfs_done errors.  I don't get them if I don't plu in the camera

 Mar 22 01:12:21 laptop2 kernel: (da0:umass-sim0:0:0:0): AutoSense failed
 Mar 22 01:12:21 laptop2 kernel: g_vfs_done():da0s1f[WRITE(offset=5780930560,
 length=16384)]error = 5
^^
Lot's and lot's of these.

Da Rock said:
It appears to be a routine attempt to determine a usb device by devd. 
Assuming you are trying to access the camera, are you able to mount it?

I just got the camera a week ago.  When I first connected it, it would 
automatically create da1-da3.  Now it doesn't.

It used to get detected with gphoto2 --auto-detect as  a Generic PTP camera.

I don't know if I changed a camera setting to cause any new behaviour, but I 
looked at them.  No setting for mode like PTP.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 15:06:14 -0500, Ryan Coleman edi...@d3photography.com 
wrote:
 I am also trying to make the directories right before the attempt
 to mount the image (a 'duh' moment just now). 
 So I'd like to have just the filename, not the full path, made
 as a folder... 

A directory. :-)



 In other news: The ISOs are all made by me, so no special chars,
 just capital and lowercase letters, sometimes numbers, no spaces
 and use of underscores and hyphens.

Underscores and hypens are traditionally not a problem. Spaces
can be and need extra attention. But as you're using PROPER
filenames, it should be easy to get the target directory name
from the ISO filename.

The unelegant way is to use basename:

DIRNAME=`basename ${FILE} .iso`

Of course, there's a sh builtin for the same purpose:

DIRNAME=${FILE%.iso}

Adding this to the iteration list, you can easily create
the directories needed prior to the mount attempt.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Ryan Coleman


On Mar 23, 2011, at 3:16 PM, Polytropon wrote:

 On Wed, 23 Mar 2011 15:06:14 -0500, Ryan Coleman edi...@d3photography.com 
 wrote:
 I am also trying to make the directories right before the attempt
 to mount the image (a 'duh' moment just now). 
 So I'd like to have just the filename, not the full path, made
 as a folder... 
 
 A directory. :-)
Thank you. :-) slip of the fingers...

 
 
 In other news: The ISOs are all made by me, so no special chars,
 just capital and lowercase letters, sometimes numbers, no spaces
 and use of underscores and hyphens.
 
 Underscores and hypens are traditionally not a problem. Spaces
 can be and need extra attention. But as you're using PROPER
 filenames, it should be easy to get the target directory name
 from the ISO filename.
 
 The unelegant way is to use basename:
 
   DIRNAME=`basename ${FILE} .iso`
 
 Of course, there's a sh builtin for the same purpose:
 
   DIRNAME=${FILE%.iso}
 
 Adding this to the iteration list, you can easily create
 the directories needed prior to the mount attempt.

I'll give this a whirl in a bit.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Ryan Coleman
Here's the working script (Yay!)

#! /bin/sh

for FILE in /mount/disc_images/*.iso; do
  DEST=$FILE
  DIRNAME=`basename ${FILE} .iso`
  echo ${DIRNAME} ${FILE}
  mkdir /mount/new_brighton/images/${DIRNAME}
  mount -t cd9660 /dev/`mdconfig -f ${FILE}`
/mount/new_brighton/images/${DIRNAME}
done

Thanks to Polytropon and Chuck for their guidance.


On Mar 23, 2011, at 3:16 PM, Polytropon wrote:

 On Wed, 23 Mar 2011 15:06:14 -0500, Ryan Coleman edi...@d3photography.com 
 wrote:
 I am also trying to make the directories right before the attempt
 to mount the image (a 'duh' moment just now). 
 So I'd like to have just the filename, not the full path, made
 as a folder... 
 
 A directory. :-)
 
 
 
 In other news: The ISOs are all made by me, so no special chars,
 just capital and lowercase letters, sometimes numbers, no spaces
 and use of underscores and hyphens.
 
 Underscores and hypens are traditionally not a problem. Spaces
 can be and need extra attention. But as you're using PROPER
 filenames, it should be easy to get the target directory name
 from the ISO filename.
 
 The unelegant way is to use basename:
 
   DIRNAME=`basename ${FILE} .iso`
 
 Of course, there's a sh builtin for the same purpose:
 
   DIRNAME=${FILE%.iso}
 
 Adding this to the iteration list, you can easily create
 the directories needed prior to the mount attempt.
 
 
 
 -- 
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 15:35:21 -0500, Ryan Coleman edi...@d3photography.com 
wrote:
 Here's the working script (Yay!)
 
 #! /bin/sh
 
 for FILE in /mount/disc_images/*.iso; do
   DEST=$FILE
   DIRNAME=`basename ${FILE} .iso`
   echo ${DIRNAME} ${FILE}
   mkdir /mount/new_brighton/images/${DIRNAME}
   mount -t cd9660 /dev/`mdconfig -f ${FILE}`
 /mount/new_brighton/images/${DIRNAME}
 done
 
 Thanks to Polytropon and Chuck for their guidance.

Just a little note:

Make sure you're mounting the ISOs as -o ro to prevent
write access to them. If users don't have +w access to
the mounted directories, you can leave out this step.
Depending on the permissions used, this might corrupt
(or at least change) the image files which may not be
desired.

If you want to omit one external program call (one per
iteration step), use DIRNAME=${FILE%.iso} instead of the
`basename ${FILE} .iso` - although it's more obvious what
DIRNAME gets designated to. :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Ryan Coleman


On Mar 23, 2011, at 3:45 PM, Polytropon wrote:

 On Wed, 23 Mar 2011 15:35:21 -0500, Ryan Coleman edi...@d3photography.com 
 wrote:
 Here's the working script (Yay!)
 
 #! /bin/sh
 
 for FILE in /mount/disc_images/*.iso; do
  DEST=$FILE
  DIRNAME=`basename ${FILE} .iso`
  echo ${DIRNAME} ${FILE}
  mkdir /mount/new_brighton/images/${DIRNAME}
  mount -t cd9660 /dev/`mdconfig -f ${FILE}`
 /mount/new_brighton/images/${DIRNAME}
 done
 
 Thanks to Polytropon and Chuck for their guidance.
 
 Just a little note:
 
 Make sure you're mounting the ISOs as -o ro to prevent
 write access to them. If users don't have +w access to
 the mounted directories, you can leave out this step.
 Depending on the permissions used, this might corrupt
 (or at least change) the image files which may not be
 desired.
 
 If you want to omit one external program call (one per
 iteration step), use DIRNAME=${FILE%.iso} instead of the
 `basename ${FILE} .iso` - although it's more obvious what
 DIRNAME gets designated to. :-)

I did try that once and it didn't strip the directory structure out so when 
basename worked I didn't mess with it too much. If we have 100+ ISOs to mount 
then I'll worry.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 16:05:12 -0500, Ryan Coleman edi...@d3photography.com 
wrote:
 I did try that once and it didn't strip the directory structure
 out so when basename worked I didn't mess with it too much.

I've just checked - you're right. While `basename` works
as intended, ${%} can be applied to pure filenames only
in this case.



 If we have 100+ ISOs to mount then I'll worry.

:-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Chuck Swiger
On Mar 23, 2011, at 1:06 PM, Ryan Coleman wrote:
 I am also trying to make the directories right before the attempt to mount 
 the image (a 'duh' moment just now). 
 So I'd like to have just the filename, not the full path, made as a folder... 

Ah, yes-- add mkdir -p /mount/office_files/images/${DEST} before the mount 
command.
Someone else mentioned a use of basedir command

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 14:17:38 -0700, Chuck Swiger cswi...@mac.com wrote:
 Ah, yes-- add mkdir -p /mount/office_files/images/${DEST} before the mount 
 command.
 Someone else mentioned a use of basedir command

Prefix it with a test:

[ -d /mount/office_files/images/${DEST} ]  mkdir...
mount...

so there will be no error if the script is started for the
second time (and the directories still exist), means: create
them only if not yet present.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Chuck Swiger
On Mar 23, 2011, at 2:21 PM, Polytropon wrote:
 Prefix it with a test:
 
   [ -d /mount/office_files/images/${DEST} ]  mkdir...
   mount...
 
 so there will be no error if the script is started for the
 second time (and the directories still exist), means: create
 them only if not yet present.

While I agree with this suggested change from the perspective of only doing 
work if you actually need to do it, note that mkdir -p doesn't return an 
error if the directory already exists.  :-)

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Automating mounting of ISO images

2011-03-23 Thread Polytropon
On Wed, 23 Mar 2011 14:24:43 -0700, Chuck Swiger cswi...@mac.com wrote:
 While I agree with this suggested change from the perspective
 of only doing work if you actually need to do it, note that
 mkdir -p doesn't return an error if the directory already
 exists.  :-)

You're telling this to a man who checks the results of fopen(),
fgets(), fprintf() and even of fclose(). :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to enable NCQ on Intel ESB2 AHCI SATA controller/ST31000340NS

2011-03-23 Thread Dan Nelson
In the last episode (Mar 22), Anton Yuzhaninov said:
 How to enable NCQ on this controller:
 ahci0@pci0:0:31:2:  class=0x010601 card=0x808015d9 chip=0x26818086 
 rev=0x09 hdr=0x00
 vendor = 'Intel Corporation'
 device = 'LSI LOGIC, 62089A2, LSISAS1068 B0, T 0620, WE 119200.1 
 (62089A2)'
 class  = mass storage
 subclass   = SATA
 bar   [10] = type I/O Port, range 32, base 0x18a0, size  8, enabled
 bar   [14] = type I/O Port, range 32, base 0x1874, size  4, enabled
 bar   [18] = type I/O Port, range 32, base 0x1878, size  8, enabled
 bar   [1c] = type I/O Port, range 32, base 0x1870, size  4, enabled
 bar   [20] = type I/O Port, range 32, base 0x1880, size 32, enabled
 bar   [24] = type Memory, range 32, base 0xd8700400, size 1024, enabled
 cap 01[70] = powerspec 2  supports D0 D3  current D0
 cap 12[a8] = SATA Index-Data Pair
 
 dmesg:
 ahci0: Intel ESB2 AHCI SATA controller port 
 0x18a0-0x18a7,0x1874-0x1877,0x1878-0x187f,0x1870-0x1873,0x1880-0x189f mem 
 0xd8700400-0xd87007ff irq 19 at device 31.2 on pci0
 ahci0: [ITHREAD]
 ahci0: AHCI v1.10 with 6 3Gbps ports, Port Multiplier supported

If you do a verbose boot, you should get a couple more lines printed:

ahci0: Caps: 64bit NCQ SNTF AL CLO 3Gbps PM PMD SSC PSC 32cmd CCC EM 6ports
ahci0: Caps2:
ahci0: EM Caps: ALHD XMT SMB LED

If you see NCQ in your Caps line, then queueing should be supported by the
controller.  Looking at the ahci.c source, there is a quirk AHCI_Q_NONCQ
that disables NCQ, but it it only used for VIA VT8251 chips.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Bridge, dpcpd, sshd

2011-03-23 Thread Chris
Hi all,

I have a server machine that I use as DHCP server, sshd login etc, and since I 
have multiple Ethernet interfaces on it, I would like to use two of those for 
the internal network to avoid adding one more ethernet switch for just one 
extra machine. DHCP should configure hosts on both those interfaces and all the 
hosts should be on the same subnet. 

So, I set up a bridge interface as per the FreeBSD handbook (ch. 31.5), but now 
dhcpd is refusing to start during boot as it claim that the bridge0 interface 
doesn't exist. If I manually start dhcpd with the same parameters after the 
machine has come up, it will start and it will also work as expected and assign 
addresses to users connecting from teh bridge interface.

sshd seems to do something similar, it refuses to start, but can manually be 
re-started later on.

Is this some kinf of expected behavior, or does it sound like I'm doing 
something badly wrong? Can I force bride0 to be configured earlier in the boot 
so it is always there when the daemons start waking up?

Configuration info below.

TIA,
  Chris

= rc.conf extract 
dhcpd_enable=YES
dhcpd_ifaces=bridge0
cloned_interfaces=bridge0
ifconfig_bridge0=addm dc0 addm dc1 up
ifconfig_bridge0=inet 172.16.0.100/24
ifconfig_dc0=up
ifconfig_dc1=up

= sshd.conf extract =
ListenAddress 172.16.0.100

=== the dhcpd.conf is quite standard and does not say anything about the 
interfaces, that info is in rc.conf above 

=== /var/log/messages extract 
 dhcpd: bridge0: not found



  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bandwith Management

2011-03-23 Thread Daniel Staal
--As of March 23, 2011 3:49:37 PM +0200, Eric Beukes is alleged to have 
said:



As well as how do I now what is actually used for the management of the
bandwith like ipfw, ect?


--As for the rest, it is mine.

As far as I know, the two most likely bandwidth management systems on a 
FreeBSD box are the two possible firewalls, ipfw or pf.  Check to see 
which, if either, is set up, and then start reading man pages and config 
files.  ;)


Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridge, dpcpd, sshd

2011-03-23 Thread Nerius Landys

 I have a server machine that I use as DHCP server, sshd login etc, and since 
 I have multiple Ethernet interfaces on it, I would like to use two of those 
 for the internal network to avoid adding one more ethernet switch for just 
 one extra machine. DHCP should configure hosts on both those interfaces and 
 all the hosts should be on the same subnet.

 So, I set up a bridge interface as per the FreeBSD handbook (ch. 31.5), but 
 now dhcpd is refusing to start during boot as it claim that the bridge0 
 interface doesn't exist. If I manually start dhcpd with the same parameters 
 after the machine has come up, it will start and it will also work as 
 expected and assign addresses to users connecting from teh bridge interface.

 sshd seems to do something similar, it refuses to start, but can manually be 
 re-started later on.

 Is this some kinf of expected behavior, or does it sound like I'm doing 
 something badly wrong? Can I force bride0 to be configured earlier in the 
 boot so it is always there when the daemons start waking up?

 Configuration info below.

 TIA,
  Chris

 = rc.conf extract 
 dhcpd_enable=YES
 dhcpd_ifaces=bridge0
 cloned_interfaces=bridge0
 ifconfig_bridge0=addm dc0 addm dc1 up
 ifconfig_bridge0=inet 172.16.0.100/24
 ifconfig_dc0=up
 ifconfig_dc1=up

 = sshd.conf extract =
 ListenAddress 172.16.0.100

 === the dhcpd.conf is quite standard and does not say anything about the 
 interfaces, that info is in rc.conf above 

 === /var/log/messages extract 
  dhcpd: bridge0: not found

I am running a very similar setup.  I learned from my own experience
that sometimes little things like the order of statements or what's
exactly inside the statement affects the outcome.  In any case after
much tweaking I got my router to work, and here is my complete
rc.conf.  People on this mailing list have helped me come up with my
rc.conf (thank you all):

gateway_enable=YES
hostname=speedy.i
ifconfig_fxp2=DHCP
cloned_interfaces=bridge0
ifconfig_bridge0=addm fxp0 addm fxp1 addm re0 addm ath0 up
ifconfig_fxp0=up
ifconfig_fxp1=up
ifconfig_re0=up
ifconfig_ath0=ssid speedy.i mode 11g mediaopt hostap channel 2 -bgscan up
ipv4_addrs_bridge0=192.168.0.254/24
ipnat_enable=YES
hostapd_enable=YES
sshd_enable=YES
named_enable=YES
ntpdate_enable=YES
ntpd_enable=YES
linux_enable=YES
dhcpd_enable=YES
dhcpd_ifaces=bridge0
apache22_enable=YES

The ath0 stuff is for a wireless access point and is not needed in
your case.  The rest you can probably understand.

fxp2 is the external facing interface, it's what is connecting to ATT
UVerse via DHCP.

The line ipv4_addrs_bridge0 is important and from what I recall it
needs to come after the interfaces are brought up, just like in the
above rc.conf.

Of course there is also some dhcpd config that is not present here.

If you still can't get it to work, try disabling dhcpd to have a
static IP network, try getting that to work first.  Then add dhcpd
once the static network is working.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bridge, dpcpd, sshd

2011-03-23 Thread Ian Smith
In freebsd-questions Digest, Vol 355, Issue 4, Message: 33
On Wed 23 Mar 2011 22:20:06 + (GMT) Chris devnullacco...@yahoo.se wrote:

  I have a server machine that I use as DHCP server, sshd login etc, 
  and since I have multiple Ethernet interfaces on it, I would like to 
  use two of those for the internal network to avoid adding one more 
  ethernet switch for just one extra machine. DHCP should configure 
  hosts on both those interfaces and all the hosts should be on the 
  same subnet.
  
  So, I set up a bridge interface as per the FreeBSD handbook (ch. 
  31.5), but now dhcpd is refusing to start during boot as it claim 
  that the bridge0 interface doesn't exist. If I manually start dhcpd 
  with the same parameters after the machine has come up, it will start 
  and it will also work as expected and assign addresses to users 
  connecting from teh bridge interface.
  
  sshd seems to do something similar, it refuses to start, but can 
  manually be re-started later on.
  
  Is this some kinf of expected behavior, or does it sound like I'm 
  doing something badly wrong? Can I force bride0 to be configured 
  earlier in the boot so it is always there when the daemons start 
  waking up?
  
  Configuration info below.
  
  TIA,
Chris
  
  = rc.conf extract 
  dhcpd_enable=YES
  dhcpd_ifaces=bridge0
  cloned_interfaces=bridge0
  ifconfig_bridge0=addm dc0 addm dc1 up
  ifconfig_bridge0=inet 172.16.0.100/24

There's your problem, and the response by Nerius Landys (read in the 
archives, as it hasn't arrived here in a digest yet :) would seem to 
indicate correct config - except that it has nothing to do with the 
order of assignments in rc.conf, but that your first ifconfig_bridge0
assignment is replaced, not added to, by the second.

It's important to know that /etc/rc.conf is a sh script that is sourced 
(that is, executed inline) at the end of /etc/defaults/rc.conf and so 
its statements are executed sequentially.  These statements just assign 
values to variables, and have no bearing at all on the order in which 
the rc.d system will actually use them; that depends on rcorder(8).

Nerius has indicated use of e.g:

  ipv4_addrs_bridge0=192.168.0.254/24

to assign address(es) to the bridge, avoiding your problem above.

  ifconfig_dc0=up
  ifconfig_dc1=up
  
  = sshd.conf extract =
  ListenAddress 172.16.0.100
  
  === the dhcpd.conf is quite standard and does not say anything about 
  the interfaces, that info is in rc.conf above 
  
  === /var/log/messages extract 
   dhcpd: bridge0: not found

Yes; at that time your bridge hadn't been created, ie it had no members.

cheers, Ian
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org