Wednesday, May 23, 2012

Solaris-10 squid-3 dying on particular FTP sites


on a Solaris 10 machine using Squid 3.1.16, every now and then, when connecting to particular FTP sites, it will make squid die


seems that the problem is something to do with the data channel and the FTP session trying to do something fancy called EPSV ...

i've no idea what that is, but the fix to stop squid dying because of these problem FTP servers is to set "ftp_epsv off" in the squid.conf

exc01-sp-p:/web/server/squid/etc # rcsdiff -r1.15 squid.conf
=============================================================
50a51,52
> ftp_epsv off
>



ps. i am not sure if the remote FTP servers are very old, or very new



ON ANOTHER NOTE

be sure to disable --enable-eui as well

Monday, April 2, 2012

FreeBSD: activating front panel headphones



making the front panel headphone socket work under FreeBSD 9.0


freebsd:/ # tail /boot/device.hints
hint.hdac.1.cad0.nid27.config="as=1 seq=15 device=Headphones"


Motherboard is INTEL S5520SC

Thursday, March 15, 2012

using NETCAT to transfer files

EXAMPLE 1

using hosts, RECEIVER and SENDER, NETCAT a file from one machine to another


a. set up the remote listener

receiver:~/INCOMING # nc6 -l -p 9876 > newname.tar

"-l" says LISTEN
"-p port" is the port to listen on


b. netcat the file from the sending machine

sender:~ # nc6 -x receiver 9876 < oldname.tar

"-x" makes it hang up after the transfer is done, ie. close down the receiver once the sender is done



c. use your file!

receiver:~/INCOMING # tar tf newname.tar | wc
27 27 307

ps. this will work with any arbitrary file, I used a .tar file simply to demonstrate that the file transferred properly in this example by running the sent file through tar itself to verify that it was good, it is probably prudent to verify that your file transferred properly - "cksum" and other similar utilities will help with that

sender:~ # cksum oldname.tar
3708157944 1505280 oldname.tar

receiver:~/INCOMING # cksum newname.tar
3708157944 1505280 newname.tar


EXAMPLE 2

using a receiver and a sender, TAR a directory from one machine to another



a. make a new directory for your incoming tar explosion

receiver:~ # mkdir INCOMING


b. set up the receiving end with a gtar

receiver:~/INCOMING # nc6 -l -p 9876 | gtar xvf -


c. send your tarred up directory

sender:~ # gtar cf - . | nc6 -x receiver 9876


the "-x" says transfer the file then hang up


d. now use your files!

receiver:~/INCOMING # nc6 -l -p 9876 | gtar xvf -
nc6: using stream socket
./
./.lesshst
./.vimrc
./nc6-1.0/
./nc6-1.0/CREDITS
./nc6-1.0/bootstrap
./nc6-1.0/aclocal.m4
./nc6-1.0/intl/
./nc6-1.0/intl/dcngettext.o
./nc6-1.0/intl/osdep.c
./nc6-1.0/intl/ngettext.c
./nc6-1.0/intl/gettext.o
....snip....
./.aliases
./.cvsrc
./.netrc
./.epltidyrc
./dot.tar




just from basic testing, this would seem to be about 20% faster than doing an "scp -c blowfish"