Spam-Mails, PHP, Tracking

Install runkit module:

wget https://github.com/downloads/zenovich/runkit/runkit-1.0.3.tgz
tar xf runkit*.tgz
cd runkit-1.?.?
phpize
./configure
make
make install

Edit php.ini:

extension=runkit.so
runkit.internal_override=1
auto_prepend=/sendmail_tracker.php

Create /sendmail_tracker.php:

touch /sendmail_tracker.php
chown root:root /sendmail_tracker.php
chmod 755 /sendmail_tracker.php

Edit /sendmail_tracker.php:

<?php

runkit_function_redefine('mail','','

        $mail_args = func_get_args();
        $sendmail_tracker_log =  "\n\n".date("d.m.y H:i:s") . "\n";
        $sendmail_tracker_log .= "### Start Mail\n";
        $sendmail_tracker_log .= "Script: ".$_SERVER[\'SCRIPT_FILENAME\']."\n\n";
        $sendmail_tracker_log .= "Mail to: ".$mail_args[0]."\n";
        $sendmail_tracker_log .= "Mail subject: ".$mail_args[1]."\n";
        $sendmail_tracker_log .= "Args: ".print_r(func_get_args(),TRUE)."\n";
        $sendmail_tracker_log .= "\n### End Mail";
        $sendmail_tracker_fp =   fopen("/var/log/sendmail_tracker_log","a+");
        fwrite( $sendmail_tracker_fp, $sendmail_tracker_log);
        fclose( $sendmail_tracker_fp );

        unset($sendmail_tracker_log);
        unset($sendmail_tracker_fp);
        unset($mail_args);
');

?>

Create logfile:

touch /var/log/sendmail_tracker_log && chmod 666 /var/log/sendmail_tracker_log

Restart Apache

Read logfile:

tail -f /var/log/sendmail_tracker_log | grep Script

Extreme Networks ACL

# vi ssh-acl.pol

ssh-acl.pol:

entry permitMGMT {
	if match all {
		protocol tcp;
		destination-port 22-23;
		source-address 1.1.1.1/32;
		destination-address 2.2.2.2/32;
	} then {
		permit;
		count permitMGMT;
	}
}

entry dropMGMT {
	if match all {
		protocol tcp;
		destination-port 22-23;
		destination-address 2.2.2.2/32;
	} then {
		deny;
		count dropMGMT;
	}
}

# check policy ssh-acl
# configure access-list ssh-acl vlan Mgmt

Galaxy S3 und „Hallo?!?“ …

Mein Galaxy S3 hat leider einen technischen Defekt. Irgendwas am Empfangsmodul dürfte defekt sein – hab jetzt als Zwischenlösung noch eines gekauft und erstmal meine ganzen Daten migriert. Morgen geht das Defekte zur Reparatur raus und ich bin schon gespannt, was das Ding für ein Leiden hat :(.