Saturday, April 6, 2013

Certificate Authority


A Certificate Authority or Certification Authority (CA) is an entity which issues digital certificates for use by other parties.
Create a Certificate Authority (CA)
Step 1) Change setting for /etc/pki/tls/openssl.cnf file as below

Step 2) Create directory on corresponding directory as given below. Create key for CA

Step 3) Create Self sign certificate for CA

Step 4) now you are ready to be a CA.

You could approve CSR to CRT by executing below command
Openssl –ca –in abc.csr –out abc.crt

Ethernet channel bonding


Guys, Recently I used two lan cards (eth0 and eth1) attached on a system to bond as a single lan card for fault tolerance.
So I followed below steps

Step 1) Change kernel parameter to bound two lan cards as a single virtual card bond0

echo -e "alias bond0 bonding\noptions bond0 mode=1 primary=eth1 use-carrier=0" >>/etc/modprobe.conf
sysctl -p

step2) change settings for eth0,eth1 and bond0

echo -e "DEVICE=eth0\nMASTER=bond0\nSLAVE=yes"> /etc/sysconfig/network-scripts/ifcfg-eth0

echo -e "DEVICE=eth1\nMASTER=bond0\nSLAVE=yes"> /etc/sysconfig/network-scripts/ifcfg-eth0
echo -e "DEVICE=bond0\nIPADDR=192.168.0.4\nNETMASK=255.255.255.0\nONBOOT=yes">/etc/sysconfig/network-scripts/ifcfg-bond0

Step 3) Restart the network

/etc/init.d/network restart

Note :-
1)     You could check status of your virtual card (bond0) by executing below command
cat /proc/net/bonding/bond0
2)      Depending on your use/requirements  we could use several parameters (like mode,milmon,use-carrier) in modeprobe.conf.
I hope this could be easily googled by youJ

Per user setting in vsftpd


Guys, you know it is possible to set configuration option on per user basis in vsftpd.

Just set a parameter “user_config_dir=/etc/vsftpd_user_list” in vsftpd.conf

EXAMPLE- Then when a user amit tries to login in, vsftpd will seek ftp settings in the file “/etc/vsftpd_user_list/amit” for that session.

You could define any valid vsftpd parameter in this file and this will be applicable for that user only.

Tuesday, April 2, 2013

Compile Proftpd with virtual user



Hi Friends, Recently I configured Proftpd with Virtual user ftp access.
Below are the steps that I follow for the same.

Step 1) Download and compile proftpd

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5rc2.tar.gz
tar -xvzf proftpd-1.3.5rc2.tar.gz
cd proftpd-1.3.5rc2
./configure --prefix=/usr/proftpd
 Make
Make install

Step 2) Change setting on proftpd.conf

vi /usr/proftpd/etc/proftpd.conf

# Set the user and group under which the server will run.
User                            ftp
Group                           ftp

DefaultRoot ~
AuthOrder mod_auth_file.c
AuthUserFile /usr/proftpd/ftpd.passwd
AuthGroupFile /usr/proftpd/ftpd.group
RequireValidShell off
# Normally, we want files to be overwriteable.
AllowOverwrite          on


Step 3) adding virtual user 

     1. Create directory for ftp user

     2.Add users to ftpd.passwd
ftpasswd --uid <uid> --gid <gid> --gecos "Full Name" --name <username> --shell /bin/false --home <path> --passwd
ftpasswd --gid <gid> --name <groupname> --group
  1. Add members to a group
ftpasswd --gid <gid> --name <groupname> --member <membername> --group
  1. Set permissions on the ftpd.passwd and ftpd.group files
chmod 400 /usr/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
chown ftp.ftp /usr/proftpd/ftpd.passwd /etc/proftpd/ftpd.group
  1. Restart ProFTPD
 /usr/proftpd/sbin/proftpd


Note: To change password of FTP Only user use below command

      ftpasswd –passwd –name=ftp_login –change-password


Renew k8s certificates

Check If certificate expires: amikum@~:03:06:54(⎈ |local-cluster:default):sudo kubeadm certs check-expiration CERTIFICATE                EXP...