Usually a firewall is used to protect a server from other servers and networks. However, in some cases you may also want to protect a server within a network by using a TCP Wrapper.

The Xinetd super server that comes with most Linux distributions includes a built-in TCP wrapper. It can be used to explicitly define network services to accept incoming connections from specified servers and networks.
Read the rest of this entry

The script found on the following site http://bashcurescancer.com

The a script is called monitorCpuUsage.sh. It is meant to be called from crontab and to inform you of processes or users who maybe using excessive amounts of cpu.
Read the rest of this entry

There are several ways to do this and the best way is to install a utility called “lsof” which you can find in /usr/ports/sysutils/lsof. Once you install this you will type:
# lsof -i
This will list out all the ports / ips / hostnames that are listening on your server. Another way would be to use the “netstat” command by typing:
# netstat --listen

How to change the mysql port

To change the port, select the “my.cnf file.

Change it to whatever you like and remove the # from the front. Then restart the engine and you should be set for that.

Open /etc/my.cnf file:

# vi /etc/my.cnf

Set new port 5123:
port=5123
Here is is my sample /etc/my.cnf file:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=5123
old_passwords=1
bind = 203.171.31.11

The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them.
Read the rest of this entry