Reverting to an ext2 File System
If you wish to revert a partition from ext3 to ext2 for any reason, you must first unmount the partition by logging in as root and typing:
Next, change the file system type to ext2 by typing the following command as root:
/sbin/tune2fs -O ^has_journal block_device
Check the partition for errors by typing the following command as root:
/sbin/e2fsck -y block_device
Then mount the partition again as ext2 file system by typing:
mount -t ext2 block_device /mount/point
Next, remove the .journal file at the root level of the partition by changing to the directory where it is mounted and typing:
Remember to update the /etc/fstab file.
Tags: ext2
Creating an ext3 File System
After installation, it is sometimes necessary to create a new ext3 file system. For example, if you add a new disk drive to the system, you may want to partition the drive and use the ext3 file system.
The steps for creating an ext3 file system are as follows:
1.Format the partition with the ext3 file system using mkfs.
2.Label the partition using e2label.
The tune2fs allows you to convert an ext2 filesystem to ext3.
/sbin/tune2fs -j block_device
Where block_device contains the ext2 filesystem you wish to convert. You must recreate the initrd image so that it will contain the ext3 kernel module. To create this, run the mkinitrd program.
Tags: ext3
DDOS attack: Find the domains which are under attack.
If your cpanel server is under DDOS attack then just go to the directory /usr/local/apache/domlogs and then use the command:
grep ‘408 -’ *.com > output_file_name
You can use the search pattern for any other domains with the extension .net .org etc.
408 Request Timed Out
Successful Client Requests
200 OK
201 Created
202 Accepted
203 Non-Authorative Information
204 No Content
205 Reset Content
206 Partial Content
Tags: DDOS
How to Disable Telnet
TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23.
1. Login to your server through SSH and su to root.
2. Type pico /etc/xinetd.d/telnet
3. Look for the line: disable = no and replace with disable = yes
4. Now restart the inetd service: /etc/rc.d/init.d/xinetd restart
5. Turn off it through chkconfig as well because it can still start through that.
/sbin/chkconfig telnet off
6. Scan your server to ensure port 23 is closed.
Tags: Telnet
Setting up remote mysql server on DA
Make sure that port 3306 is open on the remote box.
Basically, you just run the “GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost” command again, but you change localhost to the IP of your DA server.
GRANT ALL PRIVILEGES ON *.* TO user@16.15.4.1 WITH GRANT OPTION;
FLUSH PRIVILEGES;
Test it out by logging into your DA machine via ssh, and type:
mysql -uda_admin -p –host=16.15.4.1
Tags: remote mysql