Archive for the ‘chfl4gs’ Category

ssh ‘connection reset by peer’ issue

Posted on May 6th, 2011 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

OpenSSH
I have been plagued by ssh problem since openssh 5.8p1 on OpenSuSE 11.4. Without any warning, even debug level is set to 3, ssh connection to older router/server is dropped silently. I have issue ssh’ing to AMD64 FreeBSD 8.2-RELEASE which comes with OpenSSH 5.4p1.

chflags@zeus:~> ssh -v 10.0.48.61 -l kevin
OpenSSH_5.8p1, OpenSSL 1.0.0c 2 Dec 2010
debug1: Reading configuration data

(Read more...)

FreeBSD : displaying chinese characters in console

Posted on January 11th, 2011 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

A quick and easy tip to display Chinese characters in console mode. This applies not only to FreeBSD, it does for Linux and some other *nix variants too.

This is what you get when dealing with Chinese characters in console mode with csh.

Just set up the environment LANG to zh_TW.UTF-8 with this command setenv LANG zh_TW.UTF-8.

Simple eh?

(Read more...)

freebsd-update : 6.2-RELEASE to 8.1-RELEASE

Posted on July 27th, 2010 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"


Put on sysadmin hat and upgraded some 6.2 freebsd boxes recently. Here are the steps that I used. Please take note that you should have a good backup before attempting this upgrade. You are WARNED!

old6# uname -a
FreeBSD old6.vnet.0rg 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

A rather aged machine without any update. Damn

(Read more...)

ssh brute force is still popular?

Posted on October 9th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

This is really old old old old stuff. But it still seems popular these days. Lots of script kiddies are out there I guess. My auth.log was harassed, flooded with ssh brute-force attacks.

Oct  1 10:13:50 sapphire sshd[43770]: Did not receive identification string from 202.150.213.94
Oct  1 12:40:35 sapphire sshd[45755]: Did not receive identification string from 212.122.224.24
Oct  1 20:15:14 

(Read more...)

FreeBSD Root on ZFS mirror using GPT

Posted on September 25th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

ZFS has been ported to FreeBSD by Pawel Jakub Dawidek for quite some time and it has been rather stable although some bleeding edges in complex setup. The current missing features are kernel CIFS server iSCSI. Nonetheless, it is powerful I decided to give my freebsd box a spin on the power file system.

1. THE SYSTEM
The box is

(Read more...)

FreeBSD : zapping file system error

Posted on August 25th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

My box crashed many times last week until its file system had inconsistency issue. In another words, it is corrupted. Even manual fsck won’t help fixing the issue. The problem appeared to be a directory had its “.” file missing!! Whenever I tried to remove the directory, “rm” with force option or “rmdir” utilities just complained about “bad file descriptor”

(Read more...)

FreeBSD : simple lagg usage

Posted on July 11th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"


The link aggregation and link failover interface, lagg(4) device, first appeared in FreeBSD 6.3. It as the name suggested allows aggregation of multiple network interfaces as one virtual lagg(4) interface for the purpose of providing fault-tolerance and high-speed links. The driver currently supports the aggregation protocols such as failover, fec, lacp, loadbalance, roundrobin, and none by detecting child interface link

(Read more...)

FreeRapid downloader

Posted on April 30th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

Quite often, most of us download files from file-hosting sites like Rapidshare, Megaupload, Ziddu, kewlshare, Badongo and etc. You are probably annoyed and sick of restriction, time wait, captcha enforced by these service providers. To avoid all those and have a hassle free download, you could probably subscribe to their service. Here is another alternative. Let this shinny little piece

(Read more...)

FreeBSD : web cluster – Frontend nginx, backend apache with SSL

Posted on April 22nd, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"


Previously, I posted write-up on glusterfs on FreeBSD clusters. Here the installment on round-robin web proxy part. In my configuration, nginx is running as front-end and apache is the back-end. Both boxes have same configuration on nginx and apache. Nginx SSL cert and key should be the same as well (with same common name i.e. www.yourdomain.com).

APACHE
I will skip

(Read more...)

FreeBSD : nginx with php-cgi on unix socket

Posted on April 17th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

UPDATE : Check out recent committed /usr/ports/www/spawn-fcgi/, it comes with a better spawn-fcgi rc.d script. Please use the script from the post. However, the spawn-fcgi.sh provided does not have option to run via unix socket. I have submitted the patch.

Few days ago, I posted a write-up, FreeBSD : php-cgi spawn-fcgi rc.d script for nginx, on running php-cgi on

(Read more...)

FreeBSD : Glusterfs with SSL (via stunnel)

Posted on April 15th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

I have been working on parallel round-robin web clusters (is this the right term?) using 2 x FreeBSD 7.1 AMD64 boxes, nginx (patched with fair upstream), apache + php (backend), glusterfs, tinydns (sitting on another box, a name server, for round robin A record) and mysql multi-master replication. The setup is mainly making use of round-robin replication concept. Although I

(Read more...)

FreeBSD : php-cgi spawn-fcgi rc.d script for nginx

Posted on April 10th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

I was busy working on glusterfs ports for FreeBSD. Still some issues to be ironed out before it can be submitted to the upstream. At same the time, I set up web servers running nginx with php5 via fastcgi. FreeBSD doesn’t have rc.d script to trigger spawn-fcgi process. So I wrote a quick one. Below is the script.

#!/bin/sh
#

(Read more...)

m0n0live : another m0n0wall live installer

Posted on February 24th, 2009 by "kevin foo (chfl4gs_)" from "bsd.m3th.org » FreeBSD"

I frequently use m0n0wall for quick and easy deployment of firewall. However, it is kind of troublesome to dd the m0n0wall image from another computer. Idea of creating this liveCD installer was originated from Chris Buechler m0n0wall live installer. Since 2005, there has been no updated release of m0n0wall live installer. Thus, I decided to create my own.

m0n0live

(Read more...)