Friday 3 January 2014

How to Install Windows 7 from USB - part 2

2.    Turn the USB Key into a Bootable Device

Insert the Windows 7 install DVD into your drive, and view the files that it contains. Copy all of the files here to a folder on your Desktop. We put the disc contents in a folder named “Windows 7”


Go back to your command prompt, running it as an Administrator. Using the “CD” command, find your way to the folder where you extracted the ISO files. Your command line path should look something like “C:\Users\USERNAMEHERE\Desktop\Windows 7\”.

Type the following commands:

CD Boot (This gets you into the “boot” directory)
Bootsect.exe /nt60 L: (where ‘L’ is the drive letter assigned to your USB key from the previous step)


Bootsect infuses boot manager compatible code into your USB key to make it a bootable device.

IMPORTANT: If you’re currently running 32-bit Windows Vista or 7, Bootsect will only work if you use the files from the 32-bit Windows 7 install disc. The Bootsect executable from the 64-bit version will not run in 32-bit Vista.

3.    Load the USB Key Up with the Install Files

 

Copy all of the extracted ISO files into the USB drive. You don’t need to do this from the command prompt. Just drag and drop the files from the “Windows 7” folder into the drive using Windows Explorer.

Your USB key is now all ready to go! Plug it into your target system and make sure you enter the BIOS (typically with F2 or F12) to temporarily change the boot order to allow booting from the USB key before your primary hard drive or optical drive. On the next restart, your system should automatically begin speedily loading setup files off of the USB key and entering Windows 7 installation.


[Editor's Note: This article was originally posted as "How To: Install Windows 7 Beta from a USB Key!"  It has been updated and reposted for the official launch of Windows 7 on Thursday.]

How to install Windows 7 from a USB - part 1

So after reading our review of Windows 7, you’re ready to take the plunge and upgrade to Microsoft's new OS. You’ve read our upgrade guide, decided whether you want 32- or 64-bit Windows 7, and bought your retail box. But what if you want to install Windows 7 on a netbook or other computer without an optical drive?

Fortunately, you’re not out of luck, because Windows 7 (and Vista, for that matter) can be installed from a USB storage key. Not only does installing from a USB key remove the need for a DVD drive, the install time is also greatly reduced – we shaved off minutes from the total install time. Our step-by-step guide will have you rocking the new version of Windows in no time!


 

Note: This guide will only work within Windows Vista or 7.

Time = 1 hour

What you need:
  • 4GB USB key
    $10, www.newegg.com
  • WinRAR
    Free Evaluation Copy, www.rarlab.com
  • Windows 7
    $99 (OEM)

1.    Format Your USB Key

Plug in your USB key and back up any existing data stored on it. You’ll need to format the key before you can make it a bootable device.


Open up a Command Prompt as an Administrator. You can do this by finding the cmd.exe in yoru Windows/System32 folder, right-clicking the executable, and selecting “Run as Administrator”. Alternatively, type CMD in the Start Menu search field and activate the Command Prompt using Ctrl + Shift + Enter.


You should be under c:\Windows\system32 (assuming your Windows partition is the C drive). Type “diskpart” in the command line to enter the Disk Partition command line tool, which lets you format and create partitions on active disks.

Type “list disk” to reveal a list of all your active disks, each of which is associated with a number. Make a note of which one is your USB key, based on the capacity. In our screenshot below, our USB drive is Disk 6 (8GB).


Next, type the following commands, one at a time:
Select Disk # (Where # is the number of your USB disk. We typed “Select Disk 6”)
Clean (removes any existing partitions from the USB disk, including any hidden sectors)
Create Partition Primary (Creates a new primary partition with default parameters)
Select Partition 1 (Focus on the newly created partition)
Active (Sets the in-focus partition to active, informing the disk firmware that this is a valid system partition)
Format FS=NTFS (Formats the partition with the NTFS file system. This may take several minutes to complete, depending on the size of your USB key.)
Assign (Gives the USB drive a Windows volume and next available drive letter, which you should write down. In our case, drive “L” was assigned.)
Exit (Quits the DiskPart tool)

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.

How to Create a Ansible Lab on your Local Machine using Vagrant in 5 min using ChatGPT - Part 2

Update the above Vagrantfile Centos 8 servers and add Public IP and dhcp on each server .. To update the provided Vagrantfile for the three ...