|
July 03, 2008
Filed Under (General) by admin on 03-07-2008
a simple trick using the .htaccess file A simple tutorial which only involves editing one little file. Useful for those of us who have mime-typed extensions or who are creating lots of test design files and want an easy way to make the design they like best their default file. 1. Create a file called .htaccess in the /public_html/ folder if you don’t have it. I think one should be there already when you get your site so if it isn’t you should create it anyway!
3. Replace best_design.weirdext with the file you want your index page to be. Related posts
March 24, 2008
Filed Under (Linux Security) by admin on 24-03-2008
The purpose of syctl hardening is to help prevent spoofing and dos attacks. This short guide will show what I have found to be a good configuration for the sysctl.conf configuration file. The most important of the variables listed below is the enabling of syn cookie protection. Only place the bottom two if you do not want your server to respond to ICMP echo, commonly referred to as ICMP ping or just ping requests. Backup sysctl.conf : # mv /etc/sysctl.conf /etc/sysctl.conf.bak Open to edit the file: # nano -w /etc/sysctl.conf Now paste the following into the file, you can overwrite the current information. #Kernel sysctl configuration file for Red Hat Linux # Disables packet forwarding # Disables IP source routing # Enable IP spoofing protection, turn on source route verification # Disable ICMP Redirect Acceptance # Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets # Disables IP source routing # Enable IP spoofing protection, turn on source route verification # Disable ICMP Redirect Acceptance # Disables the magic-sysrq key # Decrease the time default value for tcp_fin_timeout connection # Decrease the time default value for tcp_keepalive_time connection # Turn off the tcp_window_scaling # Turn off the tcp_sack # Turn off the tcp_timestamps # Enable TCP SYN Cookie Protection # Enable ignoring broadcasts request # Enable bad error message Protection # Log Spoofed Packets, Source Routed Packets, Redirect Packets # Increases the size of the socket queue (effectively, q0). # Increase the tcp-time-wait buckets pool size # Allowed local port range After you make the changes to the file you need to run the commands below to enable the changes without a reboot: # /sbin/sysctl -p # sysctl -w net.ipv4.route.flush=1 Tags: hardening, syctlRelated posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface. vnStat isnt a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions. Installing: # cd /usr/local/src Making vnstat root only: # chmod 700 /usr/bin/vnstat Now you can check the stats, use help for possible commands: # vnstat –help Tags: vnstatRelated posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
You should hide apache banner information from being displayed so the attackers are not aware of what version of Apache version you are running and thus making it more difficult for them to exploit any system holes and thus making vulnerability scanners work harder and in some cases impossible without knowing banner information. # nano /etc/httpd/conf/httpd.conf Change the ServerSignature line to: ServerSignature Off Change the ServerTokens line to: ServerTokens Prod Restart Apache: # /sbin/service httpd restart Tags: apache, serversignature, servertokensRelated posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
You should often check for updates that will fix certain bugs or improve system stability. Exploits are discovered from time to time thus leaving your system exposed to new attacks. To list available updates: # up2date -l To install updates that are not excluded: # up2date -u To install updates including excluded: # up2date -uf Tags: patches, up2dateRelated posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
The /etc/login.defs file defines the site specific configuration for the shadow password suite. By default the minimum password length is “5″ characters. Lets change this to “8″ for stronger passwords. nano /etc/login.defs Change: PASS_MIN_LEN 5 to PASS_MIN_LEN 8 Now type Ctrl+X then hit Y and enter No tag for this post.Related posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
Change directory to find your city time zone: # cd /usr/share/zoneinfo In our case it is: Asia/Manila To change: # ln -sf /usr/share/zoneinfo/Asia/Manila /etc/localtime To verify it is correct: # date You should see something similar to this: Mon Mar 24 07:10:11 PHT 2008 That’s it! Tags: linux, timezoneRelated posts
March 24, 2008
Filed Under (Linux HOW TOs) by admin on 24-03-2008
New to Linux? Need to change the hostname of you server? (A hostname is the unique name by which a network attached device is known on a network.) If you enter the wrong hostname during the installation, and you need to change the hostname, here is how you do it: Edit file /etc/sysconfig/network using your favorite editor: # nano /etc/sysconfig/network Look for HOSTNAME=xxxxxx Change the xxxx to the name you wish to set for your computer. (ex: HOSTNAME=server.mabuhayhosting.com) Save the file by typing: Ctrl+X then hit Y and enter Now restart the xinetd service: # service xinetd restart Done! You have just changed your hostname in Linux platform Tags: hostname, linux, xinetdRelated posts
March 23, 2008
Filed Under (Linux Security) by admin on 23-03-2008
MySQL is one of the most important programs on a server, unfortunately it is also pretty resource intensive. On a server it is not uncommon for a single user or even a query to take up the bulk of the servers CPU cycles. Mytop is a very useful program to see what queries a server is currently processing as well as which user is executing them. Think of mytop as top for mysql. If you see a lot from a user that means they are probably the hog. Mytop can also be useful for figuring out exactly which queries are causing the problem in the case of a self-designed website. The following is how to install mytop on the server and run it. We are going to install 2 perl modules in addition to mytop to ensure that it will work. Install TermReadKey: # cd /usr/local/src Now install DBI: # wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.48.tar.gz Finally install mytop: # wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.4.tar.gz Now simply run “mytop” and your done! Tags: mytopRelated posts
March 23, 2008
Filed Under (Introduction) by admin on 23-03-2008
Secure and harden the System Configuration File nsswitch.conf Also optimized it to perform DNS lookups more efficiently. # nano /etc/nsswitch.conf hosts: files Now type Ctrl+X then hit Y and enter No tag for this post.Related posts |
|