Archive for September, 2007
Php safe_mode
by Emre Tugriceri on Sep.23, 2007, under Security
php_admin_flag safe_mode On
safe_mode ile php, script in sahibi ile erişilmeye çalışılan dosya sahibini kontrol eder.
Belirli bir directory deki scr çalışmaması için.
<Directory /home/www/blabla/ >
php_admin_flag engine off
</Directory>
Aynı şekilde safe_mode da uygulanabilir.
Powered by ScribeFire.
smtp-auth test with telnet
by Emre Tugriceri on Sep.16, 2007, under Linux
$wget http://www.infocopter.com/know-how/bin/mimencode
$mv mimencode /bin
$chmod 755 /bin/mimencode
$ echo “user@domain.com\0user@domain.com\0password” | mimencode
dXNlckBkb21haW4uY29tXDB1c2VyQGRvbWFpbi5jb21cMHBhc3N3b3JkCg==
$telnet localhost 25
auth plain dXNlckBkb21haW4uY29tXDB1c2VyQGRvbWFpbi5jb21cMHBhc3N3b3JkCg==
235 ok, go ahead (#2.0.0)
Qmail finding configuration problems
by Emre Tugriceri on Sep.15, 2007, under Linux
It sometimes helps to run a service manually in order to find configuration problems. For example, if your qmail-smtpd/log service isn’t running, do:
cd /service/qmail-smtpd/log
svc -d .
./run
if no errors, enter a line of text and press ENTER
if still no errors, enter CTRL-D (end of file)At this point, you should be able to identify the problem and fix it. Once that’s done, return to the service’s directory, if necessary, and do:
svc -u .
Powered by ScribeFire.
File Systems form Gentoo page
by Emre Tugriceri on Sep.13, 2007, under Linux
Gentoo Linux Documentation — Preparing the Disks
Filesystems?The Linux kernel supports various filesystems. We’ll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux systems.
ext2 is the tried and true Linux filesystem but doesn’t have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when you boot your system and your filesystem happens to be in an inconsistent state.
ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. It uses an HTree index that enables high performance in almost all situations. In short, ext3 is a very good and reliable filesystem.
ReiserFS is a B+tree-based filesystem that has very good overall performance and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. ReiserFS is solid and usable as both general-purpose filesystem and for extreme cases such as the creation of large filesystems, very large files and directories containing tens of thousands of small files.
XFS is a filesystem with metadata journaling which comes with a robust feature-set and is optimized for scalability. We only recommend using this filesystem on Linux systems with high-end SCSI and/or fibre channel storage and an uninterruptible power supply. Because XFS aggressively caches in-transit data in RAM, improperly designed programs (those that don’t take proper precautions when writing files to disk and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly.
JFS is IBM’s high-performance journaling filesystem. It has recently become production-ready and there hasn’t been a sufficient track record to comment positively nor negatively on its general stability at this point.
Powered by ScribeFire.
Gentoo Telnet
by Emre Tugriceri on Sep.12, 2007, under Linux
emerge telnet-bsd
Pro-Linux Sicherheitsservice: Gentoo – telnet-bsd
The telnet-bsd telnet client is vulnerable to two buffer overflows, which could allow a malicious telnet server operator to execute arbitrary code.
Powered by ScribeFire.
proc mounts etc mtab
by Emre Tugriceri on Sep.12, 2007, under Linux
live cd src# grub-install /dev/hda
df: warning:cannot read table of mounted filesystems:no such file or directory
df: warning:cannot read table of mounted filesystems:no such file or directory
could not find device /boot: not found or not a block device
chroot olduktan sonra;
live cd src# grep -v rootfs /proc/mounts > /etc/mtab
Komutu çalıştırılmalı.
Powered by ScribeFire.
Proc dev mount and chroot
by Emre Tugriceri on Sep.12, 2007, under Linux
srv# mount -t proc none /mnt/gentoo/proc
srv# mount -o bind /dev /mnt/gentoo/dev
srv# chroot /mnt/gentoo /bin/bash
srv# env-update && source /etc/profile
Powered by ScribeFire.
Authenticating E-Mail
by Emre Tugriceri on Sep.11, 2007, under Spam
http://www.ietf.org/rfc/rfc4406.txt
Powered by ScribeFire.
iptables ile Port Knocking
by Emre Tugriceri on Sep.11, 2007, under Linux
$IPTABLES -A INPUT -p tcp –dport 22 -m recent –rcheck
–seconds 60 –name SSH -j ACCEPT
$IPTABLES -A INPUT
-p tcp –dport 21 -m recent –rcheck –seconds 60 –name SSH -j
ACCEPT
$IPTABLES -A INPUT -p tcp –dport 1599 -m
recent –name SSH –remove -j DROP
$IPTABLES -A INPUT -p tcp –dport 1600 -m recent –name
SSH –set -j DROP
$IPTABLES -A INPUT -p tcp –dport 1601
-m recent –name SSH –remove -j DROP
Powered by ScribeFire.
RPM-PGP-KEY import
by Emre Tugriceri on Sep.11, 2007, under Linux
Comments Off on RPM-PGP-KEY import more...Mysql user priv.
by Emre Tugriceri on Sep.11, 2007, under Mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
Powered by ScribeFire.