Replacing/Mirror root drive?

2002-10-10 Thread Maildrop



I currently have a 4.3 gig drive as my root/var and swap partitions.  This
drive is going bad fast and need to replace it.

I have a clean, working 10 gig drive that has been tested and verified
working correctly.

The question is, how do I "mirror" the 4.3 gig drive over to the 10 gig
drive?  Is there anything like Norton's Ghost for FreeBSD?

/dev/ad0s2b noneswapsw  0   0
/dev/ad0s1a /   ufs rw  1   1
/dev/ad0s3e /varufs rw  2   2


Regards,
Jack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



RE: Drive/DMA issuse

2002-10-14 Thread Maildrop


Any ideas on this, is it a hardware issuse, hardware config issuse, softare
issuse?

Jack

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Maildrop
> Sent: Saturday, October 12, 2002 12:22 AM
> To: Jonas Fornander; 'FreeBSD LIST'
> Subject: Drive/DMA issuse
>
>
>
>
> Everytime I boot up, I see this in my log files:
>
>
> ad0: 4112MB  [8912/15/63] at ata0-master UDMA33
> ad2: 95396MB  [193821/16/63] at ata1-master UDMA33
> ad3: 78167MB  [158816/16/63] at ata1-slave UDMA33
> ad0s1a: UDMA ICRC error reading fsbn 11199 of 5568-5571 (ad0s1 bn
> 11199; cn
> 0 tn 177 sn 48) retrying
> ad0s1a: UDMA ICRC error reading fsbn 255 of 96-127 (ad0s1 bn 255;
> cn 0 tn 4
> sn 3) retrying
> ad0s1a: UDMA ICRC error reading fsbn 255 of 96-127 (ad0s1 bn 255;
> cn 0 tn 4
> sn 3) retrying
> ad0s1a: UDMA ICRC error reading fsbn 255 of 96-127 (ad0s1 bn 255;
> cn 0 tn 4
> sn 3) retrying
> ad0s1a: UDMA ICRC error reading fsbn 255 of 96-127 (ad0s1 bn 255;
> cn 0 tn 4
> sn 3) falling back to PIO mode
>
>
> I tried switch IDE cables (used 3 differant cables on the drive)
> and played
> around with the PIO/bits in the BIOS (tried PIO 4, PIO 1, none, auto and
> both 16-bit and 32-bit and all combinations of these).  I have ran fsck on
> the drive many times.
>
> Sometimes the server crashes, I think it might be related to this
> hard drive
> (if a hard drive fails to save data, could/would this cause a
> kernel panic?)
>
> Any suggestions?  It appears the other drives are working fine.
>
> ad0s1a is my root slice/drive, btw.  (this drive has a root slice, /var
> slice and a swap slice).
>
>
> Regards,
> Jack
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



RE: Running ipfw from a webpage/using php.

2002-10-14 Thread Maildrop


Typically PHP runs as www (or nobody).  You will have to give ipfw root exec
premission (forgot what is is called, but mode 1755 and owner root) or use
sudo. (man sudo, man chmod) either should work, but be warned this is very
INSECURE!

Jack

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Patrick Holahan
> Sent: Monday, October 14, 2002 9:36 AM
> To: [EMAIL PROTECTED]
> Subject: Running ipfw from a webpage/using php.
>
>
> Hi there..
>
> Hopefully someone here is able to help me..
>
> I need to run a root command (ipfw) from apache through php. (Yes, this is
> not very secure and I'm aware of this and if anyone has any better
> suggestions, please feel free to make them.)
>
> Would anyone know how to do this?
>
> Thanks in advance
> -ph
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



RE: monitor ALL connections to ALL ports

2002-10-14 Thread Maildrop



I moved this thread to [EMAIL PROTECTED] due to a request that
[EMAIL PROTECTED] was an inapropate place to discuss this issuse.


>On Mon, Oct 14, 2002 at 02:31:05PM -0500, Maildrop wrote:
>>
>> I put these rule in:
>>
>> ipfw add count log all from any to any
>>
>> I am getting messages in my log (/var/log/all.log) that appears like
this:
>> Oct 14 14:15:06 hydra /kernel: Connection attempt to UDP 192.168.17.1:161
>> from 192.168.17.1:1166
>
>That's a log_in_vain message, not ipfw(8).
>
>> Which is exactly, what I want, but there is a couple isses:
>>
>> 1) It only logs "failed" connects.  If I try to `telnet localhost 55`, it
>> will log that, but if I do a `telnet locahost 80` (where web server is
>> running) the connection is valid and doesn't log it.
>
>Right, that's how log_in_vain works.
>

(from tcp(4))

 tcp.log_in_vainLog any connection attempts to ports where there is
not a socket accepting connections.  The value of 1
limits the logging to SYN (connection establishment)
packets only.  That of 2 results in any TCP packets
to
closed ports being logged.  Any value unlisted above
disables the logging (default is 0, i.e., the
logging
is disabled).

'1' is limited to connection established (valid connections) and '2' is
limited to connection failed... how do I get both failed AND established
from log_in_vain?  I want to log all connections, regardless if they failed
or successed, regardless if they have a daemon running on that port or not.

Currently, they are both set as '1':

net.inet.tcp.log_in_vain: 1
net.inet.udp.log_in_vain: 1


>> 2) How do I setup Syslog for this?  ipfw man page says it logs to
>> LOG_SECURITY facility.  I want to log all connections (failed or not),
into
>> one file..
>>
>> This is what I currently have in my syslogd.conf file (the log above I am
>> pulling from all.log):
>>
>> security.*  /var/log/security
>> log.security/var/log/ipfw.log
>>
>> Both these files are empty :(  I restarted syslogd.
>
>The second one should give you an error. The first one should catch
>ipfw(8) logging. You did rebuild your kernel with IPFIREWALL and
>IPFIREWALL_VERBOSE, right?
>

Yep.  4.7-release:

options IPFIREWALL
options IPDIVERT
options IPFIREWALL_VERBOSE  #enable logging to
syslogd(8)
options IPFIREWALL_VERBOSE_LIMIT=100#limit verbosity
options IPSTEALTH   #support for stealth
forwarding

Kernel that is currently running (from kernel config above, clean reboot and
didn't change anything sysctl):

net.inet.ip.fw.enable: 1
net.inet.ip.fw.one_pass: 1
net.inet.ip.fw.debug: 1
net.inet.ip.fw.verbose: 1
net.inet.ip.fw.verbose_limit: 100
net.inet.ip.fw.dyn_buckets: 256
net.inet.ip.fw.curr_dyn_buckets: 256
net.inet.ip.fw.dyn_count: 0
net.inet.ip.fw.dyn_max: 1000
net.inet.ip.fw.static_count: 7
net.inet.ip.fw.dyn_ack_lifetime: 300
net.inet.ip.fw.dyn_syn_lifetime: 20
net.inet.ip.fw.dyn_fin_lifetime: 1
net.inet.ip.fw.dyn_rst_lifetime: 1
net.inet.ip.fw.dyn_udp_lifetime: 10
net.inet.ip.fw.dyn_short_lifetime: 5
net.inet.ip.fw.dyn_grace_time: 10
net.link.ether.ipfw: 0

Something weird that I found:

hydra# ipmon -D /var/log/ipfw.log
/dev/ipl: open: Device not configured

hydra# file /dev/ipl
/dev/ipl: character special (79/0)

hydra# grep ipmon /etc/rc.conf
ipmon_enable="NO"   # Set to YES for ipmon; needs ipfilter or
ipnat
ipmon_program="/sbin/ipmon" # where the ipfilter monitor program lives
ipmon_flags="-Ds"   # typically "-Ds" or "-D /var/log/ipflog"

Is ipmon part of ipfw?


hydra# cd /var/log

hydra# ls -l ipfw*
-rw-r--r--  1 root  wheel0 Oct 14 13:26 ipfw.log
-rw---  1 root  wheel  163 Oct 13 03:05 ipfw.today
-rw---  1 root  wheel  151 Oct 12 03:07 ipfw.yesterday

hydra# cat ipfw.log

hydra# cat ipfw.today
00200   0  0 deny ip from any to 127.0.0.0/8
00300   0  0 deny ip from 127.0.0.0/8 to any
65535   0  0 deny ip from any to any

hydra# cat ipfw.yesterday
00200 00 deny ip from any to 127.0.0.0/8
00300 00 deny ip from 127.0.0.0/8 to any
65535 00 deny ip from any to any

hydra# ipfw list
00050 divert 8668 ip from any to any via dc1
00100 allow ip from any to any via lo0
00200 deny ip from any to 127.0.0.0/8
00300 deny ip from 127.0.0.0/8 to any
65000 allow ip from any to any
65100 count log logamount 100 ip from any to any
65535 deny ip from any to any





















To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



RE: monitor ALL connections to ALL ports

2002-10-15 Thread Maildrop


This is what I currently have.

/dev/ad0s3e   1.2G   912M   175M84%/var/log

I got a 30 count of sys rotates at ever 10 megs (newsyslog.conf), expect for
httpd* logs, I just leave them untouched for stat info and clean by hand,
right now htye are only 115 megs.

Jack

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Roman V. Mashak
> Sent: Monday, October 14, 2002 9:35 PM
> To: [EMAIL PROTECTED]
> Subject: Re: monitor ALL connections to ALL ports
>
>
> On Mon, Oct 14, 2002 at 11:42:25PM +0100, Matthew Seaman wrote:
> > > I want to log all connections, regardless if they failed or
> > > successed, regardless if they have a daemon running on that port or
> > > not.
>
> > The only way I can think of to achieve what you want -- logging every
> > packet received by your machine -- is to use ipfw(8) and add the 'log'
> > keyword to all appropriate rules.  You'll need to have a lot of space
> > in /var and bump up the net.inet.ip.fw.verbose_limit sysctl to some
>   Could you describe some methods of counting /var-partition size
> for saving there:
> 1) 'maillog' data
> 2) 'ipfw' logs.
>
>   Thanks in advance.
> > huge limit and run 'ipfw resetlog' at regular intervals (or ipfw(8)
> [skip]
>
> --
> Best regards, Roman
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message