Tag Archives: windows

Secure RDP connection through Vyatta using PuTTY

vyatta-rdpConnecting to SSH Server as gateway instead of directly RDP to a PC is safer way and add another layer of encryption.With this method,we can connect to any client that is behind the firewall provided that we have open the port 22 (or any other SSH port) to the SSH Server.

In First step, we’ll configure the vyatta, so that it will forward the ssh request to the internal Linux server that it will receive on it’s port 222.

(From the Configuration Mode, issue these commands)

set nat destination rule 110 description "SSH to internal Host"
set nat destination rule 110 inbound-interface eth0
set nat destination rule 110 protocol tcp
set nat destination rule 110 translation address 192.168.80.102
set nat destination rule 110 translation port 22
set nat destination rule 110 destination port 222
set nat destination rule 110 destination address X.X.X.X
commit

1

Read more of this post

Advertisements

How to Change the Network Cards Priority in Windows 7

wire-wireless

Scenario:

We are connecting with the two different networks using the wired and wireless cards simultaneously . We want to access the local resources (e.g: file server, print server, application server etc) using the wired connection while  want to browse the Internet using the wireless connection.

To check the default Network Cards Priority, open up a command prompt and issue this command:

netstat -r

2

Read more of this post

How to set Windows to boot as the default in the boot loader

Many people like to boot Windows as standard/default OS in dual-boot setup instead of Ubuntu, so in this tutorial, I will show you that how you can do this:

In a terminal, type this command to display all your grub entries:

fgrep menuentry /boot/grub/grub.cfg

Copy the underline entry – for example Windows 7 in this screenshot.

Edit the /etc/default/grub file:

sudo nano /etc/default/grub

Change the entry:

GRUB_DEFAULT=0

To

GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"

Note:paste the entry you want (including the quotes)

Then type:

sudo update-grub

That’s it, now Windows 7 will boot as default OS:

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

How to backup data from crashed Windows system

Sometimes, our Windows systems crashed for no reason because it is windows and it doesn’t need a reason to crash 🙂

But sometimes in this situation, we want to access our important files on urgent basis. So, in this tutorial, I will try to show you, how we can do this.

First download the latest version of Ubuntu Desktop and burn the ISO image on a CD or make a bootable USB.Put the Ubuntu CD/USB in the System that has been crashed and wait for the desktop to load:

Click on “Try Ubuntu” and it will present you with the Live Desktop of Ubuntu:

In order to open the Terminal,press “Ctrl + Alt + T”  and type:

gksudo nautilus

By typing this command, it will start temporary windows in which you have full access to all the files like Root user, then within the nautilus windows, click on your hard disk and copy your desired files to an external USB/Media.

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

How to install Samba server on CentOS 6

Part 1: Configuring anonymous share with samba server

To install the samba package,enter the following command:

sudo yum install samba samba-client samba-common

Check the version of installed samba software by using this command:

smbd --version

Configure the samba service, so that, it will start automatically at boot time:

sudo chkconfig smb on
sudo chkconfig nmb on

Disable the SELinux:

sudo nano /etc/selinux/config

Change SELinux from enforcing to disabled:

SELINUX=disabled

Add these Iptables rules, so that samba will work perfectly:

sudo iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
sudo iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
sudo service iptables save

Restart the Server!!!

Go to your Windows machine and use this command in order to check the WORKGROUP name:

net config workstation

It will show the output, something like this:

Backup the smb.conf file, then delete it and create the new one:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo rm /etc/samba/smb.conf
sudo touch /etc/samba/smb.conf
sudo nano /etc/samba/smb.conf

Add these lines, in your smb.conf file (or change it according to your requirement):

#======================= Global Settings =====================================
[global]
 workgroup = WORKGROUP
 security = share
 map to guest = bad user
#============================ Share Definitions ==============================
[MyShare]
 path = /samba/share
 browsable =yes
 writable = yes
 guest ok = yes
 read only = no

Save the smb.conf file and restart the service:

sudo service smb restart
sudo service nmb restart

Access the samba share from windows (where centos is the name of my samba server):

wao, we are able to access the samba share successfully :-)

Let’s try to create something, inside the share folder:

Error, we cannot create anything inside the share folder :-(

Check the current permission on the samba share:

cd /samba/
ls -l

Change it, in such a way that everyone can read and write it(Check it, that it is allowed in your environment or not):

sudo chmod -R 0777 share
ls -l

Try to create something again, inside the share folder:

Verify the newly created file on samba server:

cd share/
ls -l

Part 2: Add and manage users and groups

Add a group in your CentOS server (in my case smbgrp):

sudo groupadd smbgrp

Create a new share, set the permission on the share:

cd /samba/
sudo mkdir secure
sudo chown -R arbab:smbgrp secure/ 
ls -l 
sudo chmod -R 0770 secure/
ls -l

Add the user to the samba group and create samba password:

sudo usermod -a -G smbgrp arbab
sudo smbpasswd -a arbab

Edit the smb.conf file:

sudo nano /etc/samba/smb.conf

Add the newly created samba share in smb.conf file:

[Secure]
path = /samba/secure
 valid users = @smbgrp
 guest ok = no
 writable = yes
 browsable = yes

Restart the samba service:

sudo service smb restart
sudo service nmb restart

Check the syntax error with testparm:

sudo testparm

Testing from Windows Machine:

Verification from CentOS server:

cd /samba/secure/
ls -l 

Hope this will help you!

Please Remember me in your prayers!

Enjoy :-)


How to install Samba server on Ubuntu 12.04

Part 1: Configuring anonymous share with samba server

To install the samba package,enter the following command:

sudo apt-get install samba samba-common

Check the version of installed samba software by using this command:

smbd --version

Also install these suggested packages for samba:

sudo apt-get install python-glade2 system-config-samba

Go to your Windows machine and use this command in order to check the WORKGROUP name:

net config workstation

It will show the output, something like this:

Backup the smb.conf file, then delete it and create the new one:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 
sudo rm /etc/samba/smb.conf 
sudo touch /etc/samba/smb.conf 
sudo nano /etc/samba/smb.conf

Add this, in your smb.conf file (or change it according to your requirement):

#======================= Global Settings ===================================== 
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ============================== 
[MyShare]
path = /samba/share 
browsable =yes
writable = yes
guest ok = yes
read only = no

Save the smb.conf file and restart the service:

sudo service smbd restart

Access the samba share from windows (where ubuntu is the name of my samba server):

wao, we are able to access the samba share successfully 🙂

Let’s try to create something, inside the share folder:

Error, we cannot create anything inside the share folder 😦

Check the current permission on the samba share:

cd /samba/
ls -l

Change it, in such a way that everyone can read and write it(Check it, that it is allowed in your environment or not):

sudo chmod -R 0777 share
ls -l

Try to create something again, inside the share folder:

Verify the newly created file on samba server:

cd share/
ls -l 


Part 2: Add and manage users and groups

Add a group in your ubuntu server (in my case smbgrp):

sudo addgroup smbgrp

Create a new share, set the permission on the share ,add the user to the samba group and create samba password:

cd /samba/
sudo chown -R arbab:smbgrp secure/ 
ls -l 
sudo chmod -R 0770 secure/
ls -l
sudo adduser arbab smbgrp
sudo smbpasswd -a arbab

Add the newly created samba share in smb.conf file:

[secure]
 path = /samba/secure
 valid users = @smbgrp
 guest ok = no
 writable = yes
 browsable = yes

Restart the samba service and check the syntax error with testparm:

sudo service smbd restart 
sudo testparm

Testing from Windows Machine:

Verification from Ubuntu server:

cd /samba/secure/
ls -l

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

%d bloggers like this: