Gentoo

genkernel

genkernel --no-clean --install --symlink --disklabel --menuconfig all

disable device drv – networking -atm

By WladyX on 27 January, 2012 | Gentoo | A comment?

Gentoo apcupsd not shutting down UPS

If you want apcupsd to power off your UPS when it shuts down your system in a power failure, you must add apcupsd.powerfail to your shutdown runlevel:

rc-update add apcupsd.powerfail shutdown

By WladyX on 16 August, 2011 | Gentoo | A comment?

Configure PureFTPd To Accept TLS Sessions

Gentoo:

create a self-signed private certificat /etc/ssl/private/pure-ftpd.pem:
mkdir -p /etc/ssl/private
openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

/etc/conf.d/pure-ftpd:
MISC_OTHER="-Y 2"

“-Y 0″, support for SSL/TLS is disabled. This is the default.
“-Y 1″, clients can connect either the traditional way or through an SSL/TLS layer.
“-Y 2″, cleartext sessions are refused and only SSL/TLS compatible clients are accepted

source

Ubuntu:

echo 1 > /etc/pure-ftpd/conf/TLS

mkdir -p /etc/ssl/private/
openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

StartSSL cert:
cd
wget http://www.startssl.com/certs/ca.pem
wget http://www.startssl.com/certs/sub.class1.server.ca.pem
cat www.key www.crt sub.class2.server.ca.pem ca.pem > /etc/ssl/private/pure-ftpd.pem

source

By WladyX on 27 April, 2011 | Gentoo, Ubuntu | 1 comment

free space of ext3 / decreasing

Probably files being deleted but still opened by some application.

lsof -P -n +L1

lsof -P -n | grep -E -e "(path inode|deleted)"

source

By WladyX on 25 November, 2010 | General, Gentoo | A comment?

Logwatch with Metalog on Gentoo

By WladyX on 21 April, 2010 | General, Gentoo, Scripts, Security | A comment?

DKIM on Gentoo

emerge -a dkim-milter
emerge --config mail-filter/dkim-milter

/etc/mail/dkim-filter/dkim-filter.conf:
Domain domain.tld
KeyFile /etc/mail/dkim-filter/mydkim.private
Selector mydkim
UMask 000

/var/bind/domain.tld.hosts:
mydkim._domainkey.domain.tld. IN TXT "v=DKIM1; g=*; k=rsa; p=yourkeyhere;"

/etc/postfix/main.cf:
smtpd_milters = unix:/var/run/dkim-filter/dkim-filter.sock
non_smtpd_milters = unix:/var/run/dkim-filter/dkim-filter.sock

rndc reload
postfix reload
/etc/init.d/dkim-filter start

Test by sending email to autorespond+dkim@dk.elandsys.com.

PS: If you want dkim only to sign mails, not to verify them, then change the mode in /etc/mail/dkim-filter/dkim-filter.conf:
##  Mode [sv]
##      default sv
##
##  Indicates which mode(s) of operation should be provided.  “s” means
##  “sign”, “v” means “verify”.

Mode            s

source1
source2

By WladyX on 17 March, 2010 | Gentoo, Mail | A comment?

Find packages installed from overlays

eix -Jc

By WladyX on | Gentoo | A comment?

Apache vhost SSL SNI

In the ssl virtual host fragment:

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/ssl/apache2/wxs.crt
SSLCertificateKeyFile /etc/ssl/apache2/wxs.key
SSLCertificateChainFile /etc/ssl/apache2/sub.class1.server.ca.pem
SSLCACertificateFile /etc/ssl/apache2/ca.pem
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
SSLOptions StrictRequire
SSLProtocol all -SSLv2

This is for StartSSL.com certs.

By WladyX on 10 December, 2009 | Apache, General, Gentoo | A comment?

Sony Ericsson Codes

Getting your IMEI (International Mobile Equipment Identity) Number: *#06#
Access Software version: > * < < * < *
Reach last dialed numbers: 0 then #
The Sony Ericsson Secret Menu screen: -> * <- <- * <- *
Change to Default Language (English): < 0 0 0 0 >
Info about SIMLOCK: < * * <
Opening phone without a SIM card: **04*0000*0000*0000# followed by on ‘Wrong Pin’ number

Sony Ericsson Codes – Esato archive

By WladyX on 2 February, 2009 | Gentoo | 1 comment

Emerge warning

If you get this warning when using emerge

WARNING: repository at … is missing a repo_name entry

you need to create a file “repo_name” containing the overlay name into the “profiles” directory under your overlay directory. If my overlay is in /opt/my-overlay, i need this file :

# cat /opt/my-overlay/profiles/repo_name
myoverlay

By WladyX on 15 October, 2008 | Gentoo | A comment?