Category: Linux

Linux Tips and tricks, either for desktop or internal system.

Linux, XEN

Installing an Ubuntu 12.0.4 LTS as Xen DOMu in Debian Squeeze hypervisor

Lately I needed to install Zimbra 8.0.3 which only installs easily in an Ubuntu 10.0.4 or 12.0.4 LTS system. So I decided for that to install an Ubuntu 12.0.4 LTS as Xen DOMu in a Debian Squeeze Xen Hypervisor and here is how I did it. The following commands can be put into a runnable …

Linux, Postfix

Installing OpenDKIM in Debian Squeeze/Wheezy

Introduction Lately my mail server started to get refusals of emails from large mailing systems like AOL, Yahoo etc. I can’t blame them for trying to minimize the SPAMS to their clients. Although using an approved relay service is a good solution, if you want to take care of it yourself here is OpenDKIM at …

Linux, XEN

Using pyGRUB on Squeeze/Wheezy to boot a domU kernel

This adapded article is based on the following Debian Wiki article: http://wiki.debian.org/PyGrub In this article I assume: – The reader is familiar with Linux and Xen Hypervisor – The DOMu system partition is using a file image instead of a physical partition. Introduction: This method offers the advantage of loading the kernel which is installed …

Linux

Synchronization of directories with GlusterFS between 2 Debian/Ubuntu hosts

There are many methods existing on the market to synchronize content of directories between hosts. eg. rsync, lsyncd, duplicity etc. The most difficult part though is bidirectionally synchronize them so that no conflicts occur. One method is using the program Unison which works well but if a file gets modified differently on both servers between …

Apache, Linux

Compiling an Apache module after Apache is been compiled

Sometimes one discovers a module which would be lovely to include in an already compiled Apache. I’m using here an example of a vanilla Apache I compiled. Constants: Source path of Apache: /www/src/ Path of compiled Apache: /www/apache/ Module to compile: proxy_http Compiling the module: cd /www/src/modules/proxy /www/apache/bin/apxs -i -a -c mod_proxy_http.c This will: – …

Linux

Installing Linux Remote Terminal using VNC on a Debian Server

Here are the instructions on how to install an efficient Linux remote desktop (XCFE) using VNC. apt-get install xorg xfce4 xfce4-goodies vnc4server Note: If you want to change the initial VNC port edit the file: /usr/bin/vnc4server and change the port as follows: eg. to change the vnc ports to start at 8081 ‘$vncPort = 8080 …

Linux, Postfix

‘blocked by Verizon Online’s anti-spam system…’ OR ‘AOL: refused to talk to me: 554- (RTR:BL)’ OR ‘AT&T: blocked by ldap:ou=rblmx,dc=att,dc=net’

Lately I’ve been confronted with the following error messages from my Postfix server form AOL, Verizon or AT&T: VERIZON: ‘blocked by Verizon Online’s anti-spam system… AOL: refused to talk to me: 554- (RTR:BL)…. AT&T: blocked by ldap:ou=rblmx,dc=att,dc=net…. Moreover after trying to get my server on the whitelist it seemed almost impossible or quite a long …

Apache, Linux

Combining Apache PHP module and fcgi in Debian Squeeze/Wheezy

Many help sites that show you how to install and configure the Apache module mod_fcgid ask you to uninstall the Generic Apache PHP module(mod_php5). Although mod_fcgid offers some advantages to the mod_php5, uninstalling the mod_php5 need not be, especially if you are running applications that don’t need to run under mod_fcgid and it uses simple …

Apache, Linux

Warning: curl_exec() has been disabled for security reasons

In Powerpress plugin of WordPress I’ve been confronted with this error: Warning: curl_exec() has been disabled for security reasons Many people suggested a hack into the functions.php of WordPress. I find this solution not very good, since it’s most likely all gone after an update of WordPress. After looking for a better solution in Google …

Linux, MySQL

logrotate /usr/bin/mysqladmin: refresh failed; error: ‘Unknown error’

Problem: After a fresh install of Debian Squeeze and mysql server, started to appear the following error as email from cron: /etc/cron.daily/logrotate: /usr/bin/mysqladmin: refresh failed; error: ‘Unknown error’ error: error running shared postrotate script for ‘/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log ‘ run-parts: /etc/cron.daily/logrotate exited with return code 1 Cause: After the installation of mysql-server package, the first …

Linux, Postfix

Configuring vacation response on incoming emails

This configuration is made to respond to each incoming email by an automated message. It is inspired from the site: http://www.akadia.com/services/automatic_email_answering.html In Debian: Install the package vacation apt-get install vacation Assumptions: System User: marie Email address: marie.larue@myserver.com Configuration: Initialize the database file ~/.vacation.db sudo -u marie vacation -I Create the following 2 files in the …

Linux, Monitoring

Installing ISTATD on Debian Squeeze/Wheezy

This HOW-TO is almost completely based on the README.txt file included in ISTATD package I included some adaptation notes. istatd is a daemon serving statistics to your iStat iPhone application from Linux, Solaris & FreeBSD. istatd collects data such as CPU, memory, network and disk usage and keeps the history. Once connecting from the iPhone …

Linux

Unlocking dpkg in Debian Squeeze

Problem Description: Although it can happen very rarely sometimes the dpkg, run by apt-get or aptitude, gets confused and leaves the lock on the mounting of its database open after being terminated. This prevents any further operations on installing, updating or configuring packages. The error would look like this: debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked …

Apache

Detecting Browser User Agent in Mod_Rewrite

Apache mod_rewrite can be used to detect whether a browser has a WAP or Smartphone device versus a normal size browser and act accordingly. Here is a method: Creating variables for different sorts of portable devices: # Wap devices BrowserMatch “MIDP” WAP_DEVICE BrowserMatch “CLDC” WAP_DEVICE BrowserMatch “UP\.” WAP_DEVICE BrowserMatch “HTC” WAP_DEVICE BrowserMatch “LG” WAP_DEVICE BrowserMatch …

Apache

Installing Google’s Apache mod_pagespeed module.

Google has recently published an Apache module which should optimize web sites delivery daynamically. I was quite suspicious about such tool and though that this could only work at the costs of page outlook quality, meaning web pages not being displayed quite the same as the original. After experimenting with it I was quite please …

Linux, Streaming

Compiling and Installing Darwin Streaming Server on Debian Squeeze

I used to run Darwin Streaming Server Version 5.5.5 and ran quite well. In order to be able to take advantage of the new features and stability of the 6.0.3 I tried to compile it in Debian Squeeze Linux and it didn’t work at all. I got many compiling warnings and errors which at the …

Linux

Troubleshooting nameservers(DNS) using dig

In order to find out where the domain resolving fails here are some tricks using the command dig to trace the recursion step by step till the DNS that fails to deliver the IP of the requested [sub]domain. Reference site: https://nsrc.org/workshops/2005/pre-SANOG-VI/bc/dns/dns2-02-dig-debug.html Tracing a well resolving domain: So first we start by asking one of the …

Apache, Linux

Using Environment variables in Apache rewrite rules

Problem: Setting multiple variables(%1-%9) in rewrite rules with RewriteCond will get rewritten by the subsequent RewriteCond for the same rewrite rule pack. eg. RewriteCond %{REQUEST_URI} ID([^/]+) RewriteCond %{REQUEST_URI} ID2([^/]+) RewriteRule ^/login.php /newlogin.php?NewID=%1&NewID2=%2 The above rule is not practical in real world, there are better ways to do this. But just as an example, we can …

Linux, MAC OS X

HowTo Flush Linux dns cache

This article is bee extracted from the URL: http://www.inetdaemon.com/tutorials/internet/dns/servers/caching.shtml of which many thanks for posting the article. I extracted what I needed and posted it again here mostly for me as a reminder. HowTo: Flush nscd dns cache Nscd caches libc-issued requests to the Name Service. If retrieving NSS data is fairly expensive, nscd is …

Linux

Authentifying with Active Directory-LDAP users via Linux LDAP tools.

I’ve got a project where we needed to make sure the user had to be authenticated against Windows Active Directory. This is what helped me. Install the LDAP tools: (Example in Debian) apt-get install ldap-utils Command to authenticate Note: the user(Username) registered in Active Directory DN(DC=ad,DC=domain,DC=net). (Return code of command should be 0 if successful) …

Linux, XEN

Creating a new Xen DOMU Debian Squeeze image file(bootstrapping)

Here is a short example with many options given which creates a new Debian Squeeze Xen 4.0x image file. The command will create a 25GB Debian Squeeze Image file in the LVM:’vservers’ which will run the 32 bit kernel 2.6.26-2-xen-686 with 2GB of RAM and 1GB of SWAP file with root password ‘changeme’. Note: remember …

Apache, Linux

Installing eAccelerator for PHP in Debian Squeeze

This great application really speeds-up the processing and therefore delivery of complex web sites based on PHP, for example from CMS like Typo3. Here is how to install it. Credits FROM: http://www.debiantutorials.com/installing-eaccelerator/ and https://github.com/eaccelerator/eaccelerator/wiki/InstallFromSource Instructions in German: http://www.sysadminslife.com/linux/eaccelerator-php-beschleuniger-installation-unter-debian-5-lenny-und-ubuntu/ Download it cd /tmp wget http://github.com/downloads/eaccelerator/eaccelerator/eaccelerator-0.9.6.1.tar.bz2 Unpack it tar -xvjf eaccelerator-0.9.6.1.tar.bz2 Prepare for compiling it apt-get install …

Linux

ERROR: Connection dropped by IMAP server

Problem: Lately I had the problem that some users could not log-in into their webmail(Squirrelmail). Squirrelmail answered: “ERROR: Connection dropped by IMAP server”. Looking into the logs I found the following lines: Jul 5 10:39:43 ms41 dovecot: imap-login: Login: user=user1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured Jul 5 10:39:43 ms41 dovecot: IMAP(user1): mail_location not set and autodetection …

Linux, Postfix

Running Postfix on multiple ports

Reference: The following Tip is been taken from the following forum: http://www.howtoforge.com/forums/archive/index.php/t-4788.html Description: Some ISPs, for some strange reasons, are blocking the port 25, therefore preventing many normal email clients software from picking-up their emails from other mail servers than their own ISP’s server. Solution: Making sure Postfix on your mail server listens on both …

Apache, Linux

Solving the problem of MaxRequestLen in mod_fcgid

Sometimes we get the following message in error.log and sometimes not. The reason is that the size of MaxRequestLen is not high enough: mod_fcgid: HTTP request length 135714 (so far) exceeds MaxRequestLen (131072) Solution: Add the following entry in the file: /etc/apache2/mods-available/fcgid.conf raise the value from the default 131072 to 15728640 (15MB) or higher if …

Apache, Linux

Compiling and install the missing dotdeb php5-fileinfo package

Dotdeb has done a terrific job at precompiling some PHP 5 packages and environment for us. Unfortunately in Dotdeb version of Debian Squeeze PHP5 packages I found the package php5-fileinfo to be missing. So here are the blind steps (without explanations) on how to compile and install this package. This is just an example unig …

Linux, Postfix, Security

Using TLS for mail delivery from postfix to another TLS activated mail server

Introduction: The default encryption method for delivering email from Postfix to another mail server is ‘NONE’ In certain cases for enhanced security reasons emails for certain destinations should be encrypted all the way: Meaning: Client 1 ==(TLS)==> Postfix Server ==TLS==> Other email Server ==SSL/TLS==> Client 2 In this case we cannot influence the way the …

Linux

Upgrade Debian using an .iso file

Here are simple steps on how to dist-upgrade a Debian system using an ISO file. Normally the process would be quite simple by replacing the entries in the repository list and call a command apt-get update; apt-get disp-upgrade. BUT what if your system doesn’t have Internet acccess while you want to do the upgrade? Here …

Linux

REF: Installing packages in different Linux Distributions

Distro URL Command ====== ======================== ============================ Debian (http://www.debian.org) apt-get install packagename Ubuntu (http://ubuntulinux.org) apt-get install packagename Suse (http://www.opensuse.org) yast -i packagename Fedora Core (http://fedoraproject.org) yum install packagename FreeBSD (http://www.freebsd.org) pkg_add -r packagename Gentoo (http://www.gentoo.org) emerge packagename OpenBSD (http://www.openbsd.org) pkg_add -r packagename

Apache

Using cache control with Apache

This article has no structure really. It is a gathering of important information and own findings concerning caching of web elements. Caching controls of web elements General rules: – The header ‘Expires:’ is an implementation of the HTTP/1.0 – The header ‘Cache-Control: max-age=xxxx’ is an implementation of the HTTP/1.1 and OVERRIDES ‘Expires:’ Extract from http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html: …

Linux

Force aptitude/apt-get ingoring broken dependencies

In the case we absolutely need to install a special Debian package, from backports for example, and force it to ignore dependencies using aptitude download and dpkg –force-depends, your apt-get and aptitude will always complain later on about it and not resume its given commands until we resolve this dependency. So when you know what …

Linux

bash – how to find a variable string length

This short how-to shows how to find out a string length in bash: Copied from the very useful web site: http://unstableme.blogspot.com/2008/03/find-string-length-bash.html Suppose: $ VAR=”Bash Scripting” Now to find the length of the above string, I have found 3 different ways: $ echo “${#VAR}” 14 $ expr length “$VAR” 14 $ echo $VAR | awk ‘{print …

Linux, Monitoring

Installing CACTI and Templates on Debian Lenny/Squeeze

In the area of monitoring systems using GPL software Nagios is a big player but the organization of displaying the history graphs is not so ideal. Zabbix is wonderful as well, it produces also good graphs but it creates them dynamically, resulting in a long wait time when we need to display a large amount …

Linux

Getting wireless Broadcom BCM4313 to work in Linux Mint 11

Unfortunately as of today June 19, the repository drivers of Wireless Broadcom BCM4313(wl.ko) don’t work well at all in Linux Mint 11. After making some research on Google I found out that there are new Linux drivers provided by the manufacturer Broadcom that simply need to be downloaded and installed. I did it and it …

XEN

Create a mixed (routed & bridged) private VLAN for Xen Virtual Machines

The most common way of configuring the networking in Xen environment is by using bridges. In the case of servers rented at Hetzner provider (Germany) this would not work because the infrastructure is allowing only one MAC address per server. It allows for multiple IPs but only one MAC address. To circumvent this situation we …

Linux

Use IPTables to load-balance web trafic

Although the Linux Kernel has already a load-balancing feature, it doesn’t come without the price of having to learn how to use it. Some tools like ‘LVS-KISS’ can help to do that job but still a bit too much sometimes when one want just crude load-balancing without any fall-back features. Here is a simple solution …

Linux, XEN

Installing Xen 4.x in Debian Squeeze (6.0)

Here are the minimum steps necessary to install Xen Hypervisor 4.x on Debian Squeeze. Installing the hypervisor and tools related aptitude install xen-linux-system-2.6-xen-amd64 xen-hypervisor-4.0-amd64 linux-image-xen-amd64 xen-qemu-dm-4.0 Change some system configuration Edit /etc/modules and add the following entry. To make sure the module ‘loop’ can create 64 loop connections. The entry ‘loop’ might already be there, …

Linux

Installing Debian ‘testing’ packages in ‘stable’ system.

Sometimes we want to install a package that is in testing state into a stable system. To do so, just follow the instructions below. NOTE: The following tips have been copied from the link: http://forums.spry.com/debian/620-how-install-testing-packages-debian-stable-apt-get.html The solution for keeping stable and installing the package is to modify apt-get configuration to setup what is called a …

Linux

Installing SAR monitoring tools

NOTE: This article is a copy of the Geek Stuff Article at: 10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring Tanks for the tips. I have copied it to make sure this important article stays part of this tips collection. Intro: Using sar you can monitor performance of various Linux subsystems (CPU, …

Linux, XEN

Assigning CPUs to Xen virtual Machines

Introduction: I’m renting a 8 CPU machine at Hetzner and I wanted to improve the performance. At the beginning I was distributing many CPUs to the virtual machines which needed it and less cpus to others. This included that some cpus would be shared by more than one Xen virtual machine. I noticed that the …

Linux

Installing Bacula Backup system on Debian Lenny

These following instructions will download, compile and install Bacula and a couple of the best Web GUIs for it. Inspired from the following German link. Thank you: http://www.asconix.com/howtos/debian/bacula-backup-debian-lenny-howto Install needed packages for Bacula server aptitude install build-essential libpq-dev libncurses5-dev libssl-dev psmisc mysql-server libmysql++-dev Download compile and install Bacuda and its web GUI wget http://downloads.sourceforge.net/project/bacula/bacula/5.0.3/bacula-5.0.3.tar.gz tar …

Apache, Linux

Installing and configuring Apache2 mod_secutity on Debian Squeeze

Install the Debian version of mod_security packages from Debian reposirory apt-get install libapache-mod-security Create an Apache config directory for mod_security mkdir /etc/apache2/modsecurity-core-rules chmod 600 /etc/apache2/modsecurity-core-rules Download and install the mod_security core rules wget http://www.modsecurity.org/download/modsecurity-core-rules_2.5-1.6.1.tar.gz tar vfx modsecurity-core-rules_2.5-1.6.1.tar.gz -C /etc/apache2/modsecurity-core-rules/ Create a symlink to adapt to all mod_security core rules(or change all the rules 🙂 ln …

Apache, Linux

LDAP Installation in Debian Lenny + Web LDAP Browser

NOTE: These instructions are assuming that the LDAP client runs on the same machine as the LDAP server runs. Environment: IP: 192.168.100.27 LDAP Client Machine names: ldapc.itmatrix.srv ldapc LDAP Server Machine names: ldaps.itmatrix.srv ldaps NOTE: This tutorial is a short and updated version of the one found at: http://techpubs.spinlocksolutions.com/dklar/ldap.html Edit /etc/hosts and se the content …

Linux, SVN

SVN + WebSVN(SSL) Installation in Debian Squeeze

These instructions show how to install the SVN system and the WebSVN via Apache SSL connection. These instructions don’t explain much, I hope your are Linux/Apache savvy enough to understand them. Install the needed Debian packages apt-get install subversion libapache2-svn openssl ssl-cert a2enmod ssl a2enmod dav_svn Everything in the dav_svn.conf configuration file is already disabled. …

Linux, XEN

Xen routed ext/int(virtual private) networking at Hetzner under Debian Lenny/Squeeze 64 Bit

At Hetzner(Germany) you can rent quite hot machines for a very good price. But what happens when you want to set-up multiple Xen virtual machines? You might get into trouble unless you follow these instructions. They are probably not the only solution for a well working xen machines farm but this one worked well for me.

Linux

Disabling the flood of kernel messages in Debian console

To disable permanently all low level kernel messages (iptables etc.) from flooding the console in Debian do the following changes: (you must be root for these changes) To make the changes permanent: Edit the file /etc/sysctl.conf add the following line: kernel.printk = 4 1 1 7 The above changes will be effective at reboot or …

Linux, Monitoring

Installing Zabbix 2.2.6 on Debian Squeeze

Debian Squeeze has still the Zabbix 1.8.2, if you want the install the 2.2.6, then one solution is to follow these instructions, the other is to do the hard work all the way(not shown here :-): The easy way: Zabbix has now Binary packages ready for Debian Wheezy to install: Reference: https://www.zabbix.com/documentation/2.0/manual/installation/install_from_packages Steps for version …

Linux, MAC OS X, Windows

Speeding up Firefox Browser

Google Chrome has now eclipsed Mozilla Firefox in the speed category. However, I still use Firefox as my main web browser because it is still better than Chrome in certain areas. But just recently, I tried a few tweaks that significantly improved the speed of Firefox making it a little bit snappier than the latest …

XEN

Troubleshooting no root login possible from Xen console

If you can’t login as root from the Xen console on a DomU then do the following: – stop the DomU – Mounted it on a directory through loop mount -o loop,rw /where/my/DomU/image.is /mnt/domu/ – chroot to it chroot /mnt/domu/ – Install the udev package. (it complains at the end..but no worry) apt-get install udev …

Linux, XEN

chroot inside xen VM VDSO problem

If inside a xen machine you try to do a chroot into a directory and get this error: Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso’ failed! One of the possible solutions is to use the following command before issuing the chroot. echo 0 >/proc/sys/vm/vdso_enabled It is supposed to have …

Linux

Some useful Linux commands

Display the content of administrative text-based databases getent {ahosts|ahostsv4|ahostsv6|aliases|ethers|group|hosts|netgroup|network|spasswd|protocols|rpc services|shadow|gshadow} Generate secure passwords Install the tool apt-get install pwgen Generates a list of 8 char. passwords pwgen Generates 1 password of 10 char long pwgen 10 1 Get the filesystem type of a partition Get the filesystem type of /dev/sda2 file -sL /dev/sda2 Get the …

MySQL

Various MySQL useful commands

Repairing all MySQL tables mysqlcheck –repair –extended –all-databases ————- Dumping the content of all databases in SQL format. (can be used for backup/migration purposes) mysqldump -p –user=root –add-drop-table –all-databases > all_my_databases.sql Import all databases from above saved file mysql -u root -p < all_my_databases.sql ------------- Dumping the content of a single database in SQL format.(can ...

XEN

Troubleshooting PTY allocation request failed on channel 0

This is an extract from a tip from ‘Xen Virtualization community support and Howto’s.‘. Thanks guys. It saved my but. When installing new virtual machine on a Debian “Lenny” host, You might get the following error message once you try SSH the new domU: PTY allocation request failed on channel 0 stdin: is not a …

XEN

Installing Windows 2003/XP/7 32 Bit on Xen in Debian Squeeze 64 Bit.

The task here is to install, run and administrate Windows 2003/XP/7 on a remote server in Internet where Xen 4.x is already installed and HVM is supported in hardware. The steps to install and run Windows are slightly different than for Linux Guests OS. In these cases Q Emu virtualization drivers are needed to complete …

MySQL

Retrieving lost MySQL root password

It often happens. You are given the job of administrating a MySQL server where the root password was lost. What to do? Here is the solution I found in Internet at the link below. Thanks for the useful tip. http://www.cyberciti.biz/tips/recover-mysql-root-password.html by Vivek Gite · 121 comments You can recover MySQL database server password with following …

Linux

10 Steps to Beautiful Shell Scripts

This is a copy of the following wonderful short and helpful site. Thanks. http://bashcurescancer.com/10-steps-to-beautiful-shell-scripts.html October 16th, 2007 Linux gurus don’t use cut, awk, and sed when they want to replace or strip out a portion if a variable. They use parameter substitution. You can learn parameter substitution in less than 2 minutes. Here is the …

Linux

Useful sed commands

USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 Compiled by Eric Pement – pemente[at]northpark[dot]edu version 5.5 Latest version of this file (in English) is usually at: http://sed.sourceforge.net/sed1line.txt http://www.pement.org/sed/sed1line.txt This file will also available in other languages: Chinese – http://sed.sourceforge.net/sed1line_zh-CN.html Czech – http://sed.sourceforge.net/sed1line_cz.html Dutch – http://sed.sourceforge.net/sed1line_nl.html French – http://sed.sourceforge.net/sed1line_fr.html German – http://sed.sourceforge.net/sed1line_de.html Italian …

Bash, MAC OS X

Replacing the missing ‘tac’ command in MAC OS X

After looking into Fink Command and Porticus I could not find the GNU command ‘tac’ for writing bash scripts. So I found these replacements which works well from the following link (Thanks guys :-)) http://trac.osgeo.org/grass/ticket/181 Normal use of tac: …..| tac |……. Replacement Nr. 1 …..| awk ‘{print NR,$0}’ | sort -nr | sed ‘s/^[0-9]* …

Linux

Recover Grub for Linux after Windows re-install

After I installed Linux Mint 8 with ext4 filesystem on /, I happned to have to reinstall Windows which whipped out my grub Boot loader of Linux Mint 8 from MBR. So after I googled around I finally found a site that explains how to recover a grub2 from an installed Linux. In my case …

Apache

Apache Log format codes

Extracted from: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#logformat Format String Description ============= ============================================================================================================ %% The percent sign %a Remote IP-address %A Local IP-address %B Size of response in bytes, excluding HTTP headers. %b Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a ‘-‘ rather than a 0 when no bytes are sent. %{Foobar}C The contents of …

Linux

Remote logging with rsyslogd

In the sender rsyslog configuration (/etc/rsyslog.conf) ——————————————— local0.* @syslog-server.com ——————————————— In the receiver rsyslog configuration (/etc/rsyslog.conf) Example: ——————————————— # provides UDP syslog reception $ModLoad imudp $UDPServerRun 514 $AllowedSender UDP, 127.0.0.1, 192.168.10.0/24 ———————————————

Apache, Linux

IP List of China and Korea for IPTABLES

Just download: http://www.okean.com/antispam/iptables/rc.firewall.sinokorea This script that can be downloaded regularly needs to be converted before it can be used. In this list the destination ports is 25 (SMTP). For web access blocking, the port needs to be changed to 80,443,25,110,22,995 etc. . A small script can be used to get the list, convert it before …