Re: more IPFW help please

2004-07-18 Thread Saint Aardvark the Carpeted
Incoming Mail List disturbed my sleep to write:
 NATD definition
 natd -p 8668 -redirect_port tcp 192.168.2.254:80 80 -n de3
 
 IPFW definitions
 100 divert 8668 log ip from 192.168.3.254 to 1.2.3.4
 300 allow log ip from any to any
 500 deny log ip from any to any

I *think* the problem with this set of rules is that you're diverting to
natd anything from the private client to the webserver, *but you're not
diverting the replies from the webserver*.  Your request goes to the
webserver with the source address set to 192.168.3.1 (the IP address
on de3).  The webserver sends the reply to 192.168.3.1, but since that
reply never gets to natd, 192.168.3.1 knows it didn't send that request
so it gets dropped silently.

One way around this would be to add a second rule:

200 divert 8668 log ip from any to 192.168.3.254

but that may cause problems...natd may drop incoming connections or
replies that it hasn't seen.  Since natd is only seeing requests to
1.2.3.4, access to other machines may end up broken.

A better/more conventional way of doing it would be:

100 divert 8668 all via de3

 This results in lots of packets accepted, but I get no output on the
 192.168.3.254 machine and the browser eventually times out.
 
 100 Divert 8669 TCP 192.168.3.254:4013 24.61.225.235:80 in via de3
 300 Accept TCP 192.168.3.254:4013 192.168.2.254:80 in via de3
 300 Accept TCP 192.168.3.254:4013 192.168.2.254:80 out via de2
 300 Accept TCP 192.168.2.254:80 192.168.3.254:4013 in via de2
 300 Accept TCP 192.168.2.254:80 192.168.3.254:4013 out via de3

Logs are good, but tcpdump is better -- you get to see the tcp flags.
This looks good, which is why I'm hedging my bet about the divert rules,
but tcpdump on (say) your client, or the machine running natd, would
show a lot more. 

HTH,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: BTX HALTED!!! I can't get this rocket in the air

2004-07-15 Thread Saint Aardvark the Carpeted
Jerry Schromm disturbed my sleep to write:
 Hi FreeBSD folk. 
 I am reading this install guide. And it doesn't get me past this one.
 For one. I downloaded the AMD64 ISO's. And this loader say's freeBSD/i386. Anyway. 
 I boot to the loader and I can't select anything. Then BTX HALTED. That is all she
 wrote. If you all have the answer to this one. Please inform me. 

I've seen this error on a few systems I've installed FreeBSD on, and
usually managed to get around it by fiddling with DMA options in the BIOS.
Which option I had to change varied between boxes, but look for anything
that mentions DMA (UltraDMA, DMA Mode, whatever) or PIO, and start
methodically tweaking them one at a time.

HTH,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: unable to ping my ISP's Servers.

2004-07-15 Thread Saint Aardvark the Carpeted
Joshua Lewis disturbed my sleep to write:
 I am able to ping my loopback as well as my static IP address. but I am
 not able to ping any other system on the net, my ISP's DNS server nor the
 ISP's Default Gateway. I am able to ping my system by FQDN and just the
 host name from the FreeBSD box.
 
 Ping error for the DNS server ping is:
 ping: sendto: No route to host
 
 Ping to the ISP Default Gateway
 ping: sendto: Host is down

No route to host makes me think that it's a routing problem.  Does:

netstat -rn | grep default

show your ISP's gateway?  If not, try adding it by hand as root:

route add default [IP address of gateway]

Try it again, and see if you still get No route to host.  Also, are
you trying to ping these servers by IP address or FQDN?  If by FQDN, try
by IP address and see if the result is any different.

I am now blessing your keyboard...
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installation and Hard Drive space

2004-07-14 Thread Saint Aardvark the Carpeted
jam man disturbed my sleep to write:
 I've been trying to load up this laptop (with 4.9 if
 it matters) which only has 750megs of storage...I
 thought this should be enough, but I get errors while
 installing: /usr: files system full.I hope I dont have
 install skack (lol)! I have /usr partitioned at 620
 megs (/ at 80)or so, and have chosen to install
 minimal without ports (I have tried this in expert
 mode and standard mode, but still recieve the same
 error). Is there something wrong, or does the most
 minimal installation of FreeBSD need more than 620megs
 in /usr??? Any reply would be appreciated.

A minimal installation usually takes about 120MB.  Are you adding X,
or any additional packages?

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gnome screensavers

2004-07-14 Thread Saint Aardvark the Carpeted
Mike Jeays disturbed my sleep to write:
 I am blown away by the variety of screen-savers that come with GNOME.  I
 have been running it for about 4 months, and there are still new ones
 that I haven't seen before.
 Is there a mechanism running to download new ones automatically, that
 may be adding to my collection without me being aware of it?  I am sure
 there weren't that many when I installed it.

Not as far as I know -- we're running GNOME at work, and the variety is
strictly from the original packager, Xscreensaver-gnome (original,
huh?).  You can set preferences (like using a blank screen...some of
the patterns use *insane* amounts of CPU) or just browse the selection
by running xscreensaver-demo.  The home page can be found at:

http://www.jwz.org/xscreensaver/

HTH,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Information

2004-07-12 Thread Saint Aardvark the Carpeted
Edmund Morgan disturbed my sleep to write:
 Hi,
 Can I apply the packages for FreeBSD 4.9 to the FreeBSD 4.10 OS?
 Thanks

As a rule, there shouldn't be any problem with this.  After all, people
regularly upgrade by running make world -- this bumps up their version
of FreeBSD, but leaves their packages unchanged.  I suppose there's a
chance that a change in FreeBSD could break a package, but I think
that's pretty unlikely.

The only downside to using old packages is, well, they're old -- newer
versions may have extra features, or (more importantly) may have
security or bug fixes.  The best way to upgrade is to use the
portupgrade tool, which can be found in /usr/ports/sysutils.  A good
introduction to portupgrade can be found at:

http://www.onlamp.com/pub/a/bsd/2003/08/28/FreeBSD_Basics.html

HTH.
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Rebuilding wtmp

2004-07-12 Thread Saint Aardvark the Carpeted
Kyle Mott disturbed my sleep to write:
 I read a few manpages and did some google'ing, and couldn't find much of
 anything about rebuilding wtmp. I tried just moving wtmp to wtmp.old and
 then doing 'touch wtmp', then logging out and back in, but it still
 reads 31Dec69. Is there some way to fix this? Thanks all.

It's possible that there's some process holding open wtmp.  (You could
check this by adding lsof (list open files) from ports -- *very* handy
to have around on general principle).  If this is the case, probably
the easiest way to fix things would be to rename the file, touch wtmp,
then reboot.

Interestingly enough, a Google for wtmp freebsd turned up this message
from the FreeBSD-Security list:

http://archives.neohapsis.com/archives/freebsd/2001-07/0055.html

which suggests cp /dev/null /var/log/wtmp to fix things -- at least on
Solaris.

I am now blessing your keyboard...

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can't Mount Optical Drive

2004-07-10 Thread Saint Aardvark the Carpeted
Jason Dusek disturbed my sleep to write:
  5 # mount /dev/acd0 /cdrom
  mount: /dev/acd0: Input/output error

You may want to try:

mount -t cd9660 /dev/acd0c /cdrom

or its equivalent:

mount_cd9660 /dev/acd0c /cdrom

Also, if you're trying to mount a DVD instead of a CD, you may need to
try:

mount_cd9660 /dev/cd0c /cdrom

 I have some another disk mounting question, too. Sometimes when I try to 
 mount the CD drive I get an error that goes something like:
 
  Incorrect super block
 
 What does this error mean? What does it mean in reference to a hard 
 drive? What does it mean in reference to a CD drive?

The superblock is a chunk of disk that has housekeeping information
like the amount of free space, where to find free inodes, and so on.

The error can mean pretty much the same things no matter what the
medium.  It might mean that you've specified the wrong filesystem --
mount (which defaults to FreeBSD's UFS filesystem) instead of mount
-t cd9660, say.  It might also mean that the the filesystem hasn't been
formatted yet, or (if a CD) that you've burned a coaster.  Or, it might
mean that you are about to be very grateful for your carefully-followed
backup plan. :-)

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Person new to FreeBSD needs help...

2004-07-10 Thread Saint Aardvark the Carpeted
Jeff Erickson disturbed my sleep to write:
 I am new to FreeBSD and am having a problem. I downloaded the ISOs of
 Disk 1 and 2
 of version 4.10 and go through the installation and everything seems
 to be fine until I reboot. Then it says that it cannot load the kernel
 or kernel.old. What am I doing wrong?

Very strange -- those files should've been copied over as part of the
installation.  Are you able to post the exact message you get?

Does your installation span more than one disk?  Is this a dual-boot
machine?  Is there anything at all unusual about your setup?

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ipfw, 2 scripts

2004-05-29 Thread Saint Aardvark the Carpeted
Gregory Edigarov disturbed my sleep to write:
 bellow you will find 2 ipfw scripts, first one working, and second
 is a very good looking, but not working.
 what am I missing in the second script?

Hm...one thing missing in script 2 is something to allow traffic via
localhost.

Another difference I can see is that in script 2, you're denying
all from 10.0.0.0/8 to 195.5.17.86 -- in script one, it says deny
to tun0.  Is it possible this is denying all packets from the
10.100.105.0/24 network you mentioned?

That said, I'm guessing.  It'd help if you could tell me what
interfaces you have, their IP addresses, and what exactly is failing.

--
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Perl metacharacters

2004-05-29 Thread Saint Aardvark the Carpeted
JJB disturbed my sleep to write:
 if (/([EMAIL PROTECTED] )/)
  {
   $abuse_email = ${1};
  }
[snip] 
 print($abuse_email) shows that it contains
 [EMAIL PROTECTED] for probes, port scans etc.
 How do I change the if statement so I only get the [EMAIL PROTECTED]
 string?

You want to minimize how much the bracket grabs.  Right now you're
telling it to grab as much as it can (.*); a better solution would
be

(/([EMAIL PROTECTED] )/)

which tells it to grab the smallest amount it can before the space.
Even better would be:

(/([EMAIL PROTECTED])\s/)

which grabs any word character, period, hyphen or underscore up to
a space.  Check your local listings to make sure I'm not leaving
out any characters legal for domain names.

 
 If (/(Net-.??-.??-.??-0-1)/)
  {
   $net_block = ${1};
  }
 
 The data is (Net-xxx-xxx-xxx-0-1)
 Each xxx group will all ways by 1 to 3 digits long and different
 combinations every time.
 When matched I want $net_block just to hold  Net-xxx-xxx-xxx-0-1
 What is the correct syntax?

Something like:

(/(Net-\d{1,3}-\d{1,3}-\d{1,3}-0-1)/

BTW, you'd be better off emailing Perl questions to a Perl-related
mailing list or newsgroup, or posting them to Perlmonks.org.

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: NIS - FreeBSD server and Linux clients

2004-05-29 Thread Saint Aardvark the Carpeted
Tom Munro Glass disturbed my sleep to write:
 I've set up NIS server as described in the handbook, and if I run 
 ypcat on the Linux client, it is obtaining information from the server. 
 However, it is faiing to authenticate users defined on the FreeBSD machine. 
 Should this work, or is there a problem with the differences between how 
 FreeBSD/Linux use the passwd file?

This should work; I've got a Linux machine at work succesfully
authenticating NIS accounts against a FreeBSD server.  I believe
that the differences in passwd files are strictly in the master.passwd
(FreeBSD) and shadow (Linux) files; the files /etc/passwd have the 
same format in both OS'.

I'd suspect problems in the way the clients have been configured.
Check that the password and group files have been set up correctly
(I screw up the sequence of plus signs and colons regularly), and
that the NIS domain has been set.

Hope that helps!

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SA-04:10 problem -- GPG error: not a detached signature

2004-05-20 Thread Saint Aardvark the Carpeted
Just a followup to let folks know that the GPG signature is working
now -- looks like the patch/signature files have been updated, and
the signature checks out.

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SA-04:10 problem -- GPG error: not a detached signature

2004-05-19 Thread Saint Aardvark the Carpeted
I've just downloaded the SA-04:10 (CVS server) patch and signature
file, and I've run into problems trying to verify it.  I run:

gpg --verify cvs.patch.asc cvs.patch

and instead of the usual Good signature from FreeBSD Security
Officer message, I see this error:

gpg: not a detached signature

I can verify the signature file alone (gpg --verify cvs.patch.asc)
-- gpg is happy with that and says it's a good signature, but that
doesn't check the patch itself.

Am I doing something wrong?  Has anyone else had this problem?

I am now blessing your GPG key ring...
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remote restart of natd

2004-03-16 Thread Saint Aardvark the Carpeted
RYAN vAN GINNEKEN disturbed my sleep to write:
 Is there a way to restart natd remotely without disconnecting myself 
 using freebsd 4.9 stable.  Have been playing around with the natd.conf 
 file and would like to see if it works or not and do not want to reboot 
 EVER.!! or be disconnected

If I'm doing this, or testing the firewall while not at the box, I
usually set up something in cron or at(1) to do something like:

/sbin/ipfw add 10 allow all from [my IP address] to [the box's ip address] 

Set it up to go off in a few minutes, and that should give you a backup
plan.

HTH,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Jails and SSL..

2004-03-08 Thread Saint Aardvark the Carpeted
adp disturbed my sleep to write:
 I want to run Apache under a FreeBSD jail. For normal http this works fine.
 However, I'm a little worried that we won't be able to use jails because we
 use SSL for several sites. With SSL we have to define one IP per site. Jails
 only have one IP. Is there a way around this other than just having one jail
 per SSL site? (I'd rather not do that!)

Something I think I'm going to end up doing is running two jails:  one
for http, one for https.  You can bind jails to local addresses (say,
127.0.0.3), and then use either natd or ipfw to forward different ports
to the appropriate jail.  

HTH,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing OpenOffice 1.1 question

2004-03-02 Thread Saint Aardvark the Carpeted
Stephen Liu disturbed my sleep to write:
 Now I have OOo1.1 downloaded but could not discover 'md5sum'

Plain ol' md5 is probably what you're looking for.  That bit me the
first time I tried it in FreeBSD -- I was used to it being called md5sum
in Linux.

HTH,
Hugh
--
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 stable release installation probs on x86

2004-02-25 Thread Saint Aardvark the Carpeted
[EMAIL PROTECTED] disturbed my sleep to write:
 I went into the BIOS and looked for the options you said
 to turn off but I couldn't find them.  Are they in the
 device config section for discs?

It depends on the BIOS, but yes, they're usually in the config section
for disks.  It's worth digging around, though, because there's nothing
that says these options have to be on one particular page.  Look for
DMA, Ultra-DMA or PIO, and try different settings to see if one works.

Don't forget to CC: your response back to freebsd-questions, so that
other folks on the list can see what's going on (and possibly correct my
mistakes :-).

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 stable release installation probs on x86

2004-02-24 Thread Saint Aardvark the Carpeted
[EMAIL PROTECTED] disturbed my sleep to write:
 When I boot after the installation the
 boot loader gives an option (F1) to load FreeBSD but when
 I hit enter, F1, or just let it time out and make the
 selection, it does nothing except turn off the monitor and
 reboot the system back into the BIOS, over, and over, and
 over again.  

I had a problem like this a while back with a particular machine;
eventually I tried turning off various settings in BIOS with the disk
(DMA, PIO, etc) and it worked.

HTH,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: file selector and shell scripts

2004-02-24 Thread Saint Aardvark the Carpeted
Vulpes Velox disturbed my sleep to write:
 I am currently working on putting together a shell script to allow me
 to save files with certian extensions under firefox and then run a few
 commands on them... the problem I am running into is there I can't
 seem to find any thing to take care of the file selector part...

I think find(1) might be what you're after.  It has a zillion options,
but a good example would be:

find /usr/local/lib -name \*.so -exec rm {} \;

which finds all the .so files in /usr/local/lib and removes them.  

Note:  Do NOT remove all your .so files. :-)

Hugh

--
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: DHCP access

2004-02-20 Thread Saint Aardvark the Carpeted
Jim Pazarena disturbed my sleep to write:
 May sound rookie, but presently I go to each box and determine it's
 IP directly and then I know the IP (at least for this session).
 There has gotta be a better way.

One thing that *might* work is displaying the arp cache.  This is the list
of MAC addresses (and their associated IP addresses) that a given host
knows about; run arp -an and look for something new/different/that has
the same MAC address.  

We do this at work periodically when hooking up new machines to a
DHCP server.  There's no question that it would work better if you ran
on the DHCP server itself, but it might work in your situation as well.

HTH,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: linux binary equivalent to ldd?

2004-02-18 Thread Saint Aardvark the Carpeted
Jesse Guardiani disturbed my sleep to write:
 How do I get info similar to what ldd gives out of a linux
 binary? If I run this:
 
 /usr/compat/linux/usr/bin/ldd /usr/local/lib/RealPlayer8/rpnp.so
 
 I get this:
 
 /usr/compat/linux/usr/bin/ldd: /lib/ld-linux.so.2: not found
 ldd: /lib/ld-linux.so.2 $exited with unknown exit code (127)
 Exit 1

Hm...if you've got the Linux compatibility stuff, you should (I think)
have this too.  Try:

locate ld-linux.so.2

On my system, it shows it as being a symlink to
/usr/compat/linux/lib/ld-2.2.4.so.  Assuming it shows up, try

/compat/linux/sbin/ldconfig -p | grep ld-linux

just to confirm that ldd really can't find it.  If it's not listed, try
running:

/compat/linux/sbin/ldconfig 

to update the list of libraries it knows about.

Usually that should be done at boot-time by the /etc/rc script -- have
you got the right option set in /etc/rc.conf?  (linux_enable=YES)

Hope that helps,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Scanning Utility

2004-02-18 Thread Saint Aardvark the Carpeted
[EMAIL PROTECTED] disturbed my sleep to write:
 would you be able to recommend a good (the best?) virus scanning utility for 
 freebsd?

I've just set up ClamAV and have no complaints at all -- in fact, I read
somewhere that it was one of the first virus scanners to add a
definition for the SCO virus.  It's available in ports, so couldn't be
easier.  

One thing to watch:  there's a bugfix that just went into the port on
Feb 10th; it prevents ClamAV from crapping out on a misformed attachment.
You might want to update your Ports tree using CVSUp before installing.

Hope that helps,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: IPFW rules

2004-02-17 Thread Saint Aardvark the Carpeted
Peter Rosa disturbed my sleep to write:
 please what's the difference between this ipfw rules:
 
 ${fwcmd} add 63000 deny ip from any to 0.0.0.255:0.0.0.255 in via ${oif}

This denies broadcasts coming in to your machine through the outside
interface.  The rule number is specified here, and it's rather high; if
it's not stopping the traffic you think it should, there may be another
rule earlier that's allowing it through.  

I'm not certain, but I think the address 0.0.0.255:0.0.0.255 means
anything ending in .255 -- the part after the colon is a netmask, and
for ipfw it means only the last byte of the address needs to match.
This would catch a broadcast going to your local network if it was a /24.
For example, if your local network was 192.168.100.0/24 (/24 is the
same netmask as 255.255.255.0), then this rule would stop broadcasts on
that network (going to 192.168.100.255).  It would *not* stop broadcasts
if you had a smaller or larger netmask, where the broadcast address
didn't end in .255.

 ${fwcmd} add deny all from any to 255.255.255.255

This denies broadcasts going in any direction (from or to your machine),
no matter what the interface.  The address specified is different from
the first -- it's 255.255.255.255, and the whole address needs to match.
Usually you'd see this address when the host is trying to figure out
its IP address -- during DHCP requests, say.

Hope that helps,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Apache ssl certificates?

2004-02-17 Thread Saint Aardvark the Carpeted
Eric F Crist disturbed my sleep to write:

 When I go the the server via https:servername I get a dialog asking
 for me to accept a certificate, but it's still the snakeoil cert!  What
 am I doing wrong?

I hate to ask the obvious, but have you restarted Apache?  I know that's
bit me a couple times...

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using SED in a script

2004-02-17 Thread Saint Aardvark the Carpeted
Jack L. Stone disturbed my sleep to write:
 This would be the steps:
 - grep(1) the new string and pipe to sed(1) ..??
 - sed(1) to find the old string  replace with the new string in a file.
 Am I on the right track??

I think so, yeah -- something like this should work:

#!/bin/sh

new=`grep foo /path/to/bar`
old=`cat /path/to/oldvariable`

sed -i.bak -e s/$old/$new/ /file/to/edit 

Note that I'm using double quotes () rather than the single quotes (')
you usually see with sed scripts; that's so I can use $newvariable
and still have the varible substituted in.  This assumes there's nothing
in $old or $new that would need to be escaped (quotes, slashes, etc).
Also, my simplistic example for grep and cat assumes that the product of
each is the thing you need to search/replace and nothing else -- if you
need the third field (say), look at awk(1).  The -i option tells sed
to edit the file in place, but keep a backup named /file/to/edit.bak.

Another, and maybe more robust approach, to editing the file would be to
try Perl, Programming Language of the Elder Gods.  (Yeah, I'm a fan. :-).
The last line could be replaced by:

perl -i.bak -new=$new -old=$old -e's/$old/$new/' \
/file/to/edit

...which would be a way of getting difficult values of new and old into
single quotes.

HTH,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: net-snmp kvm_read: Bad address

2004-02-15 Thread Saint Aardvark the Carpeted
Antoine Jacoutot disturbed my sleep to write:
 Connection from 127.0.0.1
 kvm_read(*, 1, 0xbfbfd89c, 4) = -1: kvm_read: Bad address
 auto_nlist failed on nswdev at location 1

Hm...based on this link

http://dbforums.com/arch/180/2003/5/787694

the FAQ may answer this:


http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/troubleshoot.html#NLIST-FAILED

Since you rebuilt world+kernel, is there any chance the second part
(which boot loader is being used) is relevant?
 
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: snmpd Error opening specified endpoint

2004-02-10 Thread Saint Aardvark the Carpeted
Antoine Jacoutot disturbed my sleep to write:
 I'm having a problem starting snmpd under FreeBSD-5.2-p2...
 I tried several options but I always get some strange errors.

Hm...it looks like you may already have snmp running, or at least
something else listening on UDP port 161:

 # netstat -a | grep snm
 udp4   0  0  *.snmp *.*

Try running sockstat | grep 161 and posting the results.

Also, a quick Google for snmp specified endpoint turns up a fair
number of newsgroup messages; some seem to suggest that there may be
problems with the very latest version of net-snmpd.  By any chance, are
you compiling a very recent version?

Hugh

--
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Resizing FFS

2004-02-07 Thread Saint Aardvark the Carpeted
R. D. disturbed my sleep to write:
 Can I decrease size of existing filesystem ( f. e. ad0s3f)?  I have 
 free space on it and want to create new partition.
 growfs can only increase size of existing fs. Is FBSD has instrument 
 such as resize2fs under Linux?

From what I can tell, you're out of luck on this;  there doesn't appear
to be a tool to shrink filesystems under FreeBSD.  The closest thing I
found was a reference on a NetBSD mailing list to a tool that can shrink
NetBSD filesystems (http://mail-index.netbsd.org/current-users/2001/11/09/0006.html);
unfortunately, I haven't been able to find any other reference to it.

Hugh

--
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dig/named - res_nsend: Protocol not supported

2004-02-07 Thread Saint Aardvark the Carpeted
Luke Cowell disturbed my sleep to write:
 *Why* do I need to have IPV6 enable ? Is it some configuration option 
 of named that I overlooked ?

Hm...it could be that named is only listening on IPv6 localhost (::1)
rather than IPv4 (127.0.0.1) by default, but that seems strange to me.
Try grep localhost /etc/hosts and see if you've got entries for both.
Are you running the default version of BIND, or a version from ports?

Hugh


-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ipfw rules help.

2004-02-04 Thread Saint Aardvark the Carpeted
Marwan Sultan disturbed my sleep to write:
 I compiled ipfw to accept by default.
 This is my ipfw list:
 
 00050 divert 8668 ip from any to any via rl0
 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
 65535 allow ip from any to any

Hm...this may not be a big deal, but is there any reason you're putting
the divert rule before the rules dealing with lo0/127.0.0.0/8?  The
default FreeBSD open firewall ruleset usually puts the divert rule after
-- this would be rule 400 in your example.  

 a)   lets say I want to deny everything except a range of IPs
  starting from 192.168.1.1 to 192.168.1.50.
  what rule set should be? how to set range of IPs? to pass
  and deny rest of the C class. FreeBSD Doc's doesnot cover this?
  or i didnot see.!

man ipfw(8) will help you.  Depending on the version of ipfw (I forget
when this syntax was added), you may be able to do this:

ipfw allow all from 192.168.1.{1,50} to any 
ipfw deny all from any to any

As for which rule it should be...typically what I do is write down
my firewall rules in a separate file, try to make sure that they make
sense (allow rules before deny rules, for example), then try them
out...always making sure that I have some way into the machine if I'm
working remotely!  Usually you can let ipfw take care of assigning rule
numbers, unless you've got something fairly special going on.

 b)   If i want to deny everything except ip 192.168.1.5 as follow
  00400 allow all from 192.168.1.5 to any
  01000 deny all from any to any.
 
  when ipfw reads the rules and pass by 00400 then comes to 01000
  then it denies even the 192.168.1.5, althou i put this rule before the 
  deny ? what im missing? how should i pass 1 ip and deny all?

I'm not sure why that would happen, but you can find out.  If you change
that deny rule to a deny-and-log rule, like this:

ipfw deny log all from any to any

you can then run tail -f /var/log/security and see what packets are
being caught by the deny rule.  You can also run ipfw show, which
will show you how many packets/bytes are being caught by which rules.
Again, read the man page for ipfw.

Off the top of my head, I suspect you're allowing traffic out, but not
back in -- you haven't listed a rule that would allow replies to TCP
traffic back in, or DNS queries.  Denying either of these would make it
look like nothing is working.  Try this:

allow tcp from 192.168.1.5 to any
allow udp from 192.168.1.5 to any keep-state
check-state
allow tcp from any to any established
deny all from any to any

 c)   If I want rule 00400 to expire in 9PM and be active in 8AM.(EXAMPLE)
  how do we do that? is it by set a cron job to delete and add
  the ipfw rule? or there is something to do from the ipfw it self?

As far as I know, you can only do this with a cron job.  Test carefully,
though -- it's frighteningly easy to lock yourself out while doing this
sort of thing.  I speak from bitter experience. :-)

 D)   Last Q: IF I restart the box all the rules will be reset,
  and comes to default. which is reasonable.
  How to keep it everytime I restart?
  do i create a file somewhere, and i tell my rc.conf for it?
  what the rc.conf line should be? and file format?

man rc.conf(5) will show you firewall options.  What I usually do is
write my own and keep it in a separate file -- I find rc.firewall too
confusing when trying to customize it.  But have a look at
/etc/rc.firewall and the simple option -- it probably does a lot of
what you want.

 Question out of subject, 
 How i can do something thro cronjob to make the box Email me the
 log of firewall everyday on certain time, lets say 9PM ?

Well, you could just have a script that would, say, grep for today's
date in your firewall logs and email that.  Another thing you could
consider doing, though, is signing up at dshield.org and using one of
their clients to parse your logs.  Dshield collects firewall information
from volunteers around the world, and uses it to alert people to new
or fast-moving threats.  It's an excellent idea, and a lot of help to
security people.  I use ipfw2dshield to parse and mail my logs, and as a
bonus I get a copy of the email myself to see if there's anything
interesting.

Hope that helps!

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel probe of NICs

2004-02-03 Thread Saint Aardvark the Carpeted
lee slaughter disturbed my sleep to write:
 OK, looks like 5.1 sk diver doesn't  support 3C940 but 5.2 does.
 So can I get a 5.2 sk driver and load the module?
 Or do I have to rebuild kernel?

Hm...I've never tried using a module from a different version of FreeBSD
before, but I'd be wary of trying it.  I suspect it would just not work,
rather than actually cause harm, but the best thing to do really would
be to install 5.2 (or wait for 5.2.1), either by grabbing a new ISO
image or using CVSup to grab the source and rebuild everything.
Instructions on CVSup and building world can be found in the handbook
(http://news.bbc.co.uk/2/hi/americas/3451207.stm and
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html).

 yeah, it was Intel 21143 chip and it showed up.

Or, if you've got a working ethernet card, you may just want to use that
instead -- there's no doubt it'd be a great deal easier.

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel probe of NICs

2004-02-03 Thread Saint Aardvark the Carpeted
(I sent this originally to [EMAIL PROTECTED], but it bounced.)

--

lee slaughter disturbed my sleep to write:
 OK, looks like 5.1 sk diver doesn't  support 3C940 but 5.2 does.
 So can I get a 5.2 sk driver and load the module?
 Or do I have to rebuild kernel?

Hm...I've never tried using a module from a different version of FreeBSD
before, but I'd be wary of trying it.  I suspect it would just not work,
rather than actually cause harm, but the best thing to do really would
be to install 5.2 (or wait for 5.2.1), either by grabbing a new ISO
image or using CVSup to grab the source and rebuild everything.
Instructions on CVSup and building world can be found in the handbook
(http://news.bbc.co.uk/2/hi/americas/3451207.stm and
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html).

 yeah, it was Intel 21143 chip and it showed up.

Or, if you've got a working ethernet card, you may just want to use that
instead -- there's no doubt it'd be a great deal easier.

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: usb umass flash drive mount/umount questions

2004-02-03 Thread Saint Aardvark the Carpeted
Fred Clift disturbed my sleep to write:
 So, are there other fstypes, or some kind of filesystem tuning or mount
 flags I can use to say always flush all writes synchronously so that if
 the device disappeared it would be consistent and have the right contents.

Probably a dumb question, but wouldn't -o sync do this?
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Modem help

2004-02-03 Thread Saint Aardvark the Carpeted
Rammal - disturbed my sleep to write:
 Hello
Please tell me from where can i found out Intel Ambient Modem Driver For FreeBSD 
 5.1?

Searching on Google for Intel Ambient Modem FreeBSD turns up this
link:

http://news.gw.com/freebsd.newbies/6981

From what I can tell, there isn't support for it yet.  If you're good at
programming, you may be able to help write a driver.

Hope that helps,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [Fwd: Re: kernel probe of NICs]

2004-02-03 Thread Saint Aardvark the Carpeted
lee slaughter disturbed my sleep to write:
 so can i get a 5.2 sk(4) driver and recompile into 5.1?

Maybe.  I've done something similar (grab code from later versions and
recompile into earlier versions), but it's not really kosher and I don't
know that I'd recommend it.

There's a few options open to you here.  From easiest to hardest, they
are:

-- Use another card (you mentioned that you had another spare)

-- Wait for FreeBSD 5.2.1 and see if it supports your card

-- Try compiling the driver into your current codebase


 brings up the whole release/version stuff which the more i read the more 
 confused i get.

Feel free to post any questions, and I'll answer them as best I can.
 
 i bought/installed  5.1 cd's but i'm thinking for a reliable server 
 maybe i should
 reinstall, like 4.9
 freebsd's newbie thing says 4.8 no later.

5.2 is still bleeding-edge, so I'm a bit surprised that you've leaped
into it for your first time.  If you're happy with it, great, but keep
in mind that it's still being worked on pretty seriously.  4.9 is
definitely the safe-and-stable choice.

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: can't assign requested address nn7j

2004-01-29 Thread Saint Aardvark the Carpeted
Dan disturbed my sleep to write:

 I have a alias on de2 of xxx.xxx.42.208 I can SSh to that address
 but can't ping it. I get can't  assign requested address. Netmask is
 255.255.255.248. Other port ping just fine XXX.XXX.41.1 on de2.  Any help

Hm...First of all, where are you trying to SSH from?  If you're able to
SSH from *another* box, that's a good sign.  And as for pinging, where
are you trying to ping from -- the box with de2, or another box entirely?
Also, can you show the output of ifconfig de2?

Thanks,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: BIND

2004-01-29 Thread Saint Aardvark the Carpeted
Evan Sayer disturbed my sleep to write:
 Wondering if there is a way to configure BIND to automatically update a 
 dynamic ip within your own dns?  If not, can anyone recommend a good 
 simple client?  

Depends...are you talking about a DNS server that you're running?
Google turns up this page as the first hit:

http://dag.wieers.com/howto/bits/bind-ddns.php

It's based on RedHat Linux, but the principle is the same and it looks
like it should be easy to FreeBSD-ize.

This is assuming that you're talking about updating a BIND server that
you control; if you're talking about updating something like
myplace.dyndns.org, or some other similar service, you'll want to
check with them to see what they recommend.

 Also my isp is roadrunner, and they say that they don't 
 allow web services to be run on dynamic ips.  Do they mean that they 
 block the ports literally or does it just mean they frown upon it?

Again, it depends.  It might mean they will send a nasty email, or it
might mean it's firewalled off entirely.  To see if it's the latter, try
plugging your hostname into Netcraft and see if they can tell what
webserver you're running, or get a friend to portscan you.

HTH,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: kernel probe of NICs

2004-01-29 Thread Saint Aardvark the Carpeted
[EMAIL PROTECTED] disturbed my sleep to write:
 i've installed one machine no problems but on another a suspect
 ethernet interface has developed.  It's an Asus p4p800 motherboard
 with 3C940 on the board.  (i'm suspect of this much integration)
 At first, messing with Debian and Suse, the card worked fine.
 When i sent to  installing FreeBSD no card was detected
 by sysinstall-Configure-Networking-Interfaces.
 Shouldn't it show up there?
 ifconfig doesn't see it.
 (i don't know how else to look for it)

Disclaimer:  I haven't worked with 5.1 yet, but I have got FreeBSD to
work with this motherboard and the 3c940.  Also, I'm assuming that
you've tried all this *after* installing FreeBSD, and you're not just
doing this all from the install process.

First of all, you can list all the interfaces FreeBSD has detected by
running ifconfig -a.  The driver for the 3c940 is the sk(4) driver,
which means that if it's been detected you'll see something like:

sk0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500

If you see that, you've got it made.

If not, there's another couple things to try.  First, if you haven't
compiled your own kernel yet, you may have the sk driver around as a
loadable kernel module.  See if ls /modules/*sk* shows anything;
if you see something like if_sk.ko, try kldload if_sk and then
ifconfig -a to see if it has shown up.

Another thing to try is compiling your own kernel.  Instructions can be
found in the handbook
(http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html);
you'll want to include the sk device and whatever else it may need.

One final note:  this driver has had problems up until recently with
promiscuous mode, which among other things means problems picking up an
IP address by DHCP.  I had to grab the very latest code in order to get
it working; this is a fair amount of trouble, and you may want to
consider another card until the new driver makes it to a FreeBSD
release.
 
 I plugged in another reportedly good ethernet card into a 
 PCI slot and no kernel probe detection there either, 
 but do get a green (carrier ?) light, 
 but no green light  on the motherboard NIC.

What model of ethernet card?  Again, try ifconfig -a to see what
shows up.  This will show you a lot of interfaces like lo0 or
xl1; if you chop off the number and look at the man pages (ie, man
xl), you'll see what the device is.  With luck, one of them will be
your PCI card.

Let me know what happens, and good luck

Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL 4.x questions...

2004-01-29 Thread Saint Aardvark the Carpeted
Eric F Crist disturbed my sleep to write:
Content-Description: signed data
 I installed MySQL server 4.1.0_1 to support the PostNuke CMS and the phpBB 
 bulletin board system.  For the life of me, I can't get a database setup for 
 either of them to use.  Both users groups tell me that there's a mysql 
 problem with configuration.  Here are the errors:

Hm...if I had to guess, I'd say that either MySQL isn't running, or
phpBB/PostNuke haven't been configured correctly.

Try ps auxw | grep mysql and make sure it's running.  If not, the
start script should be /usr/local/etc/rc.d/mysql.sh (I think).

Try connecting to it using the mysql client and the MySQL user name and
password you've set up for your programs:

$ mysql -u [MySQL user name] -p [database name]
Password: *

Finally, check the configuration for your programs and MySQL.  Is phpBB
trying to connect via TCP/IP?  If so, is MySQL set up to listen via
TCP/IP, or is it only on a file socket?  What about basics like the user
name and password?

Hope that helps...let me know how it turns out.

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Active System Attack Alerts

2004-01-28 Thread Saint Aardvark the Carpeted
Geir Svalland disturbed my sleep to write:
 Active System Attack Alerts
 =-=-=-=-=-=-=-=-=-=-=-=-=-=
 Jan 27 02:12:41 odin sendmail[46386]: i0R1CbKR046385: Fixed MIME 
 Content-Type header field (possible attack)
 Jan 27 02:12:41 odin sendmail[46386]: i0R1CbKR046385: Fixed MIME 
 Content-Type header field (possible attack)

First hit on Googling fixed mime content field turns up a post last
year to the freebsd-security mailing list:

http://lists.freebsd.org/pipermail/freebsd-security/2003-April/000100.html

which in turn points to a security fix in Sendmail 8.12.9.

HTH,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Active System Attack Alerts

2004-01-28 Thread Saint Aardvark the Carpeted
Geir Svalland disturbed my sleep to write:
 Shouldn't this been taken care of when I'm running Sendmail 8.12.10 ?

Well, I would expect the fix to be still in .10, and for the message
to be logged.  Or am I missing something?

Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ypset(8) attempts to bind to Weird IP (and possible solution)

2004-01-19 Thread Saint Aardvark the Carpeted
Matthew Seaman disturbed my sleep to write:
 Please do submit a PR with your analysis and a patch.  It's slightly
 perturbing that no-one spotted this a long time ago, but these things
 happen from time to time.

Thanks for taking the time to reply!  I'm glad to find out I'm not
completely wrong about this.  I'll be submitting a PR later this week.

I am now blessing your keyboard...
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


ypset(8) attempts to bind to Weird IP (and possible solution)

2004-01-18 Thread Saint Aardvark the Carpeted
A while back I came across some strange behaviour with ypset(8).  I was
having trouble at work making a host bind to our NIS server, so I thought
I'd try using ypset.  When running these commands:

domainname [domain]
ypbind
ypset -h localhost -d [domain] 192.168.0.254

and watching network traffic with tcpdump, I found UDP packets going
off to port 111 on an IP address I'd never seen before:  164.110.15.40.
As far as I could tell, it was trying to bind to the Weird IP (tm)
instead of our NIS server.

The domainname didn't seem to matter or change things; I tried both
the domain we use at work, and foo without any change in behaviour.
The same goes for the IP address I had specified, which was that of the
local NIS server.  The Weird IP was was completely unrelated to the local
network (192.168.0.0/24), and turns out to belong to the Washington
State Department of Transportation (!).  I tried this again at home,
and exactly the same behaviour was seen.

A couple days ago I decided to track this down, and found nearly the
same behaviour;  the difference is that this time, the Weird IP was
132.110.15.40, which turns out to belong to the US Army National Guard
Bureau (!!).  Again, that IP address is *completely* different from
anything on my local network or my public IP address.

This is all using 4.8-RELEASE; however, the relevant code for ypset
appears to be the same in 4.9-RELEASE.  Each test was done on a box
that had one interface, IP address 10.0.0.1, going to a gateway box
(10.0.0.254) with an external IP (192.168.0.100 at work, 192.168.23.254
at home).  I varied the IP addresses at home, but saw the same behaviour
each time.

To make a long story short, I compiled a debug version of ypset and stepped
through it with gdb.  I narrowed it down to this range of code:

120  struct hostent *hent;
[snip]
130  sin.sin_addr.s_addr = htonl(0x7f01);
131  
132  while ((c = getopt(argc, argv, h:d:)) != -1)
133  switch (c) {
134  case 'd':
135  domainname = optarg;
136  break;
137  case 'h':
138  if ((sin.sin_addr.s_addr = inet_addr(optarg)) == -1) {
139  hent = gethostbyname(optarg);
140  if (hent == NULL)
141  errx(1, host %s unknown, optarg);
142  bcopy(hent-h_addr_list[0], sin.sin_addr,
143  sizeof sin.sin_addr);
144  }
145  break;
146  default:
147  usage();
148  }

This chunk goes over the arguments to ypset; pretty much immediately
afterward, it calls bind_tohost() with sin as one of its arguments.

The problem seems to come in at lines 142/143:  before this,
sin.sin_addr.s_addr is localhost (as set at line 130), as is
hent-h_addr_list[0][0].  *After* this, it's set with the Weird IP,
bind_tohost() is called, and packets go off to the Weird IP.

ObDisclaimer:  I Am Not A Programmer, and my knowledge of C is pretty
slim.  But:  if I change lines 142/143 to:

bcopy(hent-h_addr_list[0][0], sin.sin_addr, sizeof sin.sin_addr);

then the Weird IP doesn't show up in sin, and ypset only tries to bind
to the IP address listed in its arguments.

Looking through man pages and header files, it looks like
hostent-h_addr_list is an array of pointers to chars (is that the
right term?):

char **h_addr_list

and so gethostbyname is returning the IP address as the *first entry*
in that list.  It makes sense to me, then, that bcopy should have
h_addr_list[0][0] as its first argument.

*But*, as I mentioned, I'm no programmer.  I find it hard to believe
that I could pick up a mistake that simple, especially when I'm not
at all familiar with using sockets, or that this simple-seeming fix
wouldn't introduce more problems.

So -- what's going on?  Is this a real bug, or have I misunderstood
something?

Please let me know if I've left anything out, or if there's a better
place to ask this question.

Thanks for your time, everyone!

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: new bie (tar command)

2003-02-22 Thread Saint Aardvark the Carpeted
Anil Garg disturbed my sleep to write:
 p.s. i looked earlier at -t, infact i was also trying to use -x with -t.

Logical enough, but not correct.  -t and -x are mutually exclusive.  -t means
just list the contents; -x means extract the contents (ie, get files out of
the tarball).  The tar command won't let you do both.

Hope this helps,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.

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


Re: Customizing /etc/motd

2003-02-13 Thread Saint Aardvark the Carpeted
Colin J. Raven disturbed my sleep to write:
 Greetings all!
 I'd like to tweak /etc/motd to give ssh users a personalized login text.

Printing the last time the user logged in appears to be part of login(1)
itself, not /etc/motd.  I suppose you could always modify the source
code to print the message you like, but an easier way would be to append
something to /etc/profile:

echo 'Welcome to FreeBSD, $USER!'

$USER is the user's account name.  And it looks like you need the single
quotes there to get the exclamation point to work.

Hope this helps,
Hugh
-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.

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



Re: help needed!

2003-01-28 Thread Saint Aardvark the Carpeted
 We have
 no specialists in UNIX systems, but we have a great need of measuring
 IP-traffic via the server. Can we use any standard commands for this
 purpose or do we need to get a special program for it?

MRTG is probably what you're looking for:  it produces graphs, updated every
five minutes by default, that show the level of traffic going in and out
of your server.  It's more for seeing how traffic has been over time (it keeps
statistics for a year), rather than seeing what's happening right this very second.
(If right-this-moment information is what you're after, ask about trafshow.)
It's in ports, so to install it you could either fetch it precompiled:

# pkg_add -r mrtg

or compile it yourself if you have the ports tree installed:

# cd /usr/ports/net/mrtg  make install distclean

(To see if you have the ports tree installed, do ls /usr/ports; if you see
lots of directories, you've got it.  The first method is probably easier... )

MRTG uses SNMP to get its traffic numbers, and the graphs it generates
are usually displayed via web pages -- so in addition to MRTG itself, you'd usually
need a web server like Apache, and an SNMP daemon like Net-SNMP or UCD-SNMP.

You can find more info on MRTG and some examples of how to use it at the website:

http://people.ee.ethz.ch/~oetiker/webtools/mrtg/

Hope this helps!

Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.

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



Re: freebsd as platform for video security?

2003-01-27 Thread Saint Aardvark the Carpeted
The company I work for has done something like this for a local
construction company.  Basically, we set up a modest (P-200, if I recall
correctly, maybe 64 MB of RAM) FreeBSD machine with a webcam and a video
capture card (Happauge-based, I believe) to take pictures of a site they
were building.  Cron was used to take a picture every fifteen minutes,
dial up another computer (also FreeBSD-based), and upload it; once there,
it was merged with other pictures into movie files, made available in
an archive, etc.

Sorry to be vague on the details -- I had to rebuild the box once, so I
wasn't involved in software choices, etc.  (The ImageMagick tools would
probably be a good starting point for merging pictures.)  My point is
that we did the job pretty well with modest equipment, so I think that,
at least for time-lapse pictures, it is definitely possible to do what
you're after.

Oh, one other thing -- I do remember fooling around with capture
utilities that basically acted as a web server:  every time you
connected to the machine, it would capture a picture and send it back.
That might be useful to you.  I can't remember the name of the program,
but maybe someone else can help me out.

Hope this helps,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.

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



Re: IMAP

2003-01-27 Thread Saint Aardvark the Carpeted
Gannater J?nos disturbed my sleep to write:
 How can I check IMAP or POP3 is really listening?

Other folks have mentioned sockstat; another method is just to try
telnetting to port 110 in the case of POP3 (haven't worked with IMAP
before, so not sure if this works with it).  If you get a banner back
like +OK pop3d at address starting, then you're good.

Hope this helps,
Hugh

-- 
Saint Aardvark the Carpeted
[EMAIL PROTECTED]
Because the plural of Anecdote is Myth.

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