Showing posts from September, 2014

Add a User to a Group on Linux

How can I add a user to a group under Linux operating system using command line options? How to add an existing user into a group in Linux using command line options?

Create Large Dummy File

Fsutil.exe is a built in filesystem tool that is useful to do file system related operations from command line. We can create a file of required size using this tool.

Tomcat Context Container

The Context element represents a web application , which is run within a particular virtual host. Each web application is based on a Web Application Archive (WAR) file, or a corresponding directory containing the corresponding unpacked contents, as described in the Servlet Specification (version 2.2 or later).

Tomcat Set Context Path for Web Application

Add a file called ROOT.xml in $CATALINA_BASE/conf/Catalina/localhost/

Tomcat Access Control based on IP

To implement IP filtering Tomcat offers the RemoteAddrValve class for filtering on IP and the RemoteHostValve for filtering on host name.

Keeping ssh Access Secure

There are several worms which attempt to exploit vulnerable SSH servers, by logging in to a host with a collection of usernames and passwords such as " admin/admin ", " test/test ", " root/root ", etc. These shouldn't be of much concern if you're keeping good passwords, but there are simple ways to prevent them regardless.

Limit ssh Access by IP Address

To limit ssh access to a linux box based on originating IP address, edit /etc/hosts.allow :

Tomcat SSL Certificate Installation

CSR and SSL Certificate Installation in Tomcat Web Server

The Most Common Java Keytool Keystore Commands

Java Keytool is a key and certificate management utility. It allows users to manage their own public/private key pairs and certificates. It also allows users to cache certificates. Java Keytool stores the keys and certificates in what is called a keystore. By default the Java keystore is implemented as a file. It protects private keys with a password. A Keytool keystore contains the private key and any certificates necessary to complete a chain of trust and establish the trustworthiness of the primary certificate.

9 Common Mistakes People Make On HTML

Even the best coders make mistakes sometimes. When it comes to the markup language HTML, there are some mistakes that are more common than others. You should try and avoid these.

20 Iptables Examples For New SysAdmins

Linux comes with a host based firewall called Netfilter

cURL with HTTPS in Windows

If you want to use cURL with HTTPS in Windows, you can setup it easily

Linux Kernel /etc/sysctl.conf Security Hardening

How do I set advanced security options of the TCP/IP stack and virtual memory to improve security and performance of my system? How do I configure Linux kernel to prevent certain kinds of attacks using /etc/sysctl.conf? How do I set Linux kernel parameters?

CentOS Iptables Firewall Configuration Tutorial

How do I configure a host-based firewall called Netfilter (iptables) under CentOS / RHEL / Fedora / Redhat Enterprise Linux?

Allowing MySQL on Amazon EC2 to Accept Remote Connections

Amazon's EC2 is a really great platform for well, everything!

SSH Tunnel to Remote MySQL (Port Forwarding)

We block access to production MySQL servers over port 3306 for security reasons. Here is an example, use ssh tunnel to remote MySQL, connection string that proxies localhost port 13306 to port 3306 on the target system (port forwarding)

How to Support Full Unicode in MySQL Databases

Are you using MySQL's utf8 charset in your databases? In this write-up I'll explain why you should switch to utf8mb4 instead, and how to do it.