Tuesday 22 October 2013

OpenVPN Client Configuration on Ubuntu 12.04

OpenVPN Client Configuration on Ubuntu 12.04

To use the Ubuntu as OpenVPN client, install these packages:
sudo apt-get install network-manager-openvpn
2
sudo apt-get install network-manager-openvpn-gnome
3
Select the “Edit Connections” from Network Manager GUI:
4
From the VPN tab, click on ‘Add‘ button:
5
Select OpenVPN as the VPN Connection Type and press “Create“:
6
Enter all the required information like OpenVPN’s server ip address/name as the “Gateway“, “Type” to “Certificates (TLS)“, locate and point your “User Certificate” , “CA Certificate and “Private Key“. Also click on “Advanced” button:
7
Enable compression or other special settings as per your requirement:
8
Connect to the VPN:
9
If everything go well, it will show you the success message:
10
Check your interface configuration, you will find one new interface named “tun0” something:
ifconfig
11
Hope this will help you!

Friday 18 October 2013

How to Remove Vmware Workstation From Ubuntu 13.04 for Good



VMWare Workstation doesn't ship in a deb, so it isn't registered in dpkg (which is why you can't find it in the software center). It does have an install and uninstall utility though.

To uninstall VMWare Workstation, you will need to run
vmware-installer --uninstall-product vmware-workstation

If you just run
vmware-installer

by itself, it will print all the options you have available. If you run
vmware-installer -l

It will print a list of all VMWare products you have installed.

Tuesday 1 October 2013

How to Install Ruby & Rails on CentOS, Fedora or RedHat

#get root access
$su -
$ cd /tmp
 
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
$ yum install openssl-devel
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure
$ make
$ make install
# Install ruby
$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
$ tar zxf ruby-1.9.3-p194.tar.gz
$ cd ruby-1.9.3-p194
$ ./configure
$ make
$ make install
# Update rubygems
$ gem update --system
$ gem install bundler
#Test ruby and rubygems are working
#Close shell and reopen for changes to take effect
$ruby -v
$gem --version
# Rails
$ yum install sqlite-devel
$ gem install rails
$ gem install sqlite3

Thursday 12 September 2013

Installing LXC ( Linux Containers ) With LXC Web Pannel In Ubuntu

What is LXC

Linux Containers (LXC) are lightweight virtualization technology and provide a free software virtualization system for computers running GNU/Linux, This is accomplished through kernel level isolation, It allows one to run multiple virtual units (containers) simultaneously on the same host.
  • manage resources using PCG ( process control groups ) implemented via cgroup filesystem
  • Resource isolation via new flags to the clone(2) system call (capable of create several types of new namespace for things like PIDs and network routing)
  • Several additional isolation mechanisms (such as the “-o newinstance” flag to the devpts filesystem).
The LXC package combines these Linux kernel mechanisms to provide a userspace container object, a lightweight virtual system with full resource isolation and resource control for an application or a system.
Installing LXC ( ubuntu 13.04 )
 $ sudo apt-get install lxc
Creating container
$ sudo lxc-create -t ubuntu -n ubuntu
$ sudo lxc-start -n ubuntu
Login in container
$ sudo lxc-console -n ubuntu -t 1
Install LXC web panel
$ sudo apt-get install lxc debootstrap bridge-utils -y
$ sudo su
$ wget http://lxc-webpanel.github.com/tools/install.sh -O - | bash
Login in LXC web panel
open broswer 

http://localhost:5000  
username :  admin 
password admin
web panel config file :  /srv/lwp/lwp.conf
lxc1
lxc3
lxc2
lxc5

useful links :

Source :  http://www.computersnyou.com/2123/2013/07/installing-lxc-with-lxc-web-pannel-in-ubuntu/  By On

Fail2Ban is an intrusion prevention framework written in the Python


Introduction

Fail2Ban is an intrusion prevention framework written in the Python programming language. It works by reading SSH, ProFTP, Apache logs etc.. and uses iptables profiles to block brute-force attempts.

Installation

To install fail2ban, type the following in the terminal:
sudo apt-get install fail2ban 

Configuration

To configure fail2ban, make a 'local' copy the jail.conf file in /etc/fail2ban
cd /etc/fail2ban
sudo cp jail.conf jail.local 
Now edit the file:
sudo nano jail.local 
Set the IPs you want fail2ban to ignore, the ban time (in seconds) and maximum number of user attempts to your liking:
[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host
ignoreip = 127.0.0.1
bantime  = 3600
maxretry = 3 

Email Notification

Note: You will need sendmail or any other MTA to do this.
If you wish to be notified of bans by email, modify this line with your email address:
destemail = your_email@domain.com 
Then find the line:
action = %(action_)s 
and change it to
action = %(action_mw)s 

Jail Configuration

Jails are the rules which fail2ban apply to a given application/log:
[ssh]

enabled = true
port    = ssh
filter  = sshd
logpath  = /var/log/auth.log
maxretry = 3 
To enable the other profiles, such as [ssh-ddos], make sure the first line beneath it reads:
enabled = true 
Once done, restart fail2ban to put those settings into effect
sudo /etc/init.d/fail2ban restart 

Advanced: Filters

If you wish to tweak or add log filters, you can find them in
/etc/fail2ban/filter.d 

Testing

To test fail2ban, look at iptable rules:
sudo iptables -L 
Attempt to login to a service that fail2ban is monitoring (preferably from another machine) and look at the iptable rules again to see if that IP source gets added.

External Links


Remarks (Robert van Reems): To test fail2ban on Ubuntu 12.04 server edition a reboot is required. Restarting or reloading the service didn't work.

Secure Your Azure DevOps Pipeline: GitHub Advanced Security to the Rescue

  Stop Shipping Your Passwords to Production: How GitHub Advanced Security for Azure DevOps Saves the Day (and Your Reputation) Let's fa...