Posts

Checking Apache for possible hack

1. Edit php.ini sendmail_path = /usr/local/bin/phpsendmail create a filter file wrapper. I saw this one and it is very handy. /usr/local/bin/phpsendmail #!/usr/bin/php <?php /**   This script is a sendmail wrapper for php to log calls of the php mail() function.   Author: Till Brehm, www.ispconfig.org   (Hopefully) secured by David Goodwin <david @ _palepurple_.co.uk> */ $sendmail_bin = '/usr/sbin/sendmail'; $logfile = '/var/log/mail.form'; //* Get the email content $logline = ''; $pointer = fopen('php://stdin', 'r'); while ($line = fgets($pointer)) {         if(preg_match('/^to:/i', $line) || preg_match('/^from:/i', $line)) {                 $logline .= trim($line).' ';         }     $mail .= $line; } //* compose the sendmail command $command = 'echo ' . escapeshellarg($ma...

Firebird create and restore backup

Create Database on FireBirdie [root@data]# /usr/lib64/firebird/bin-superserver/isql Use CONNECT or CREATE DATABASE to specify a database SQL> create database 'mydatabase.gdb' CON> user 'sysdba' password 'masterkey'; SQL> quit; Dump the old backup [root@data]# gbak -r o -v -user SYSDBA -password masterkey /home/dbackup/mydatabase-2013-06-20.gbk mydatabase.gdb

Socket file /var/run/clamav/clamd.sock could not be bound: Permission denied

I have been having this problem on some installations of amavis and clamav using Centos and Ubuntu. I might have passed a step on installation. The problem is permission in exact and I have been editing groups and users amavis, clamav and root A solution was posted on http://www.howtoforge.com/forums/showthread.php?t=34559 might do the trick. For a quick fix (not a good one) chmod 777 the folder =)

Linux Postfix single data server with master slave replication for courier-imap authentication

Image

tmfs increase size

edit /etc/fstab line to look something like this: tmpfs                   /dev/shm                tmpfs   size=10g        0 0 remount it mount -o remount tmpfs

Dual Nic both facing internet

You have two public ip address need to see both on internet and you ate your whole day... Me too kindly comment if yours worked!!!!! eth0 192.168.0.161 on network 192.168.0.0 gateway 192.168.0.1 eth1 192.167.0.51 on network 192.1687.0.9 gateway 192.167.0.1 Here! Create two routing tables T0 and T1 add t /etc/iproute2/rt_tables Add these lines 100    T0 101    T1 ip route add 192.167.0.0 dev eth1 src 192.167.0.161 table T1 ip route add default via 192.167.0.1 table T1 ip route add 192.168.0.0 dev eth0 src 192.168.0.51 table T0 ip route add default via 192.168.0.1 table T0 Next ip route add 192.167.0.0 dev eth1 src 192.167.0.51 ip route add 192.168.0.0 dev eth0 src 192.168.0.161 next ip route add default via eth1 ( this might be already configured ) * NOTE you might have the default gateway on eth0 * next ip rule add from 192.167.0.161 table T1 ip rule add from 192.168.0.51 table T0 Thanks to the urls below: http://www....

Can't use proxy because no authentication schemes are fully configured.

So you are having problems on webmin + squid authentication ? My current setup is below. I was eating my finger nails asking why before it was working and now it doesnt. System hostname localhost.localdomain (127.0.0.1) Operating system CentOS Linux 6.3 Webmin version 1.620 Virtualmin version 3.98.gpl GPL Earn  money  register free! [root@122 ~]# service squid start Starting squid:                                            [FAILED] 2013/02/23 00:17:00| Processing Configuration File: /etc/squid/squid.conf (depth 0) 2013/02/23 00:17:00| ERROR: '0.0.0.0/0.0.0.0' needs to be replaced by the term 'all'. 2013/02/23 00:17:00| SECURITY NOTICE: Overriding config setting. Using 'all' instead. 2013/02/23 00:17:00| WARNING: (B) '::/0' is a subnetwork ...