IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Computer Networking Class Details

5 posters

Go down

Computer Networking Class Details Empty Computer Networking Class Details

Post by BIT0122-Amit Sun Oct 24, 2010 9:37 pm

Course Code: CSE 403
Course Name: Computer Networking

(Today a lot of classmates were telling to me and some other friends about giving some things in forum. Thing is, they rarely even post in forum.
Before telling us to post something, how about posting something yourselves? )

Many of you were absent in today's class, and today was a short class when we consider the practical factors.
So, I am just going mention what topics were covered in today's class, and then.. will try to discuss some things about practicals.

DNS resolving, difference between forward and backward resolving.
gTLD
ccTLD
Two types of ccTLD
How ARPA is used for backward resolving.
How zone file is used for ARPA entry.
Sample Zone entry:
Protocols used in Internet:
TCP
UDP
How these two are used, their default port, advantages and disadvantages.

Telnet, which is used for remote shell, but does not offer security.
FTP and its ports of communication and file transfer.

SSL, SFTP, their ports.

Practical part:

(Because some of you are confused about some steps, So I am going to cover details Jewel Sir didn't mention about. I will try to be descriptive)

Practical Part description:

How to use SSH, how to deny and allow specific IP.

Stage 1: Understanding what SSH is:

SSH is actually a secured shell environment. Using this you can log in to another people's PC, and do whatever you like. IF you have that PCs password and the necessary permissions.
We do not use Telnet because in telnet, data is sent in simple text format. It is not encrypted. Anyone can pick up that data and read it, and then use it.
But SSH is different. It uses RSA and DSA to encrypt the data passed between the server and client. So, even if someone gets the data, there is very little possibility that he will be able to decrypt the data.

Stage 2: Preparing PC for SSH:

Actually, if you just want to use ssh to connect to a remote pc which is running a SSH server, you can do it in default Ubuntu settings. ssh client is pre installed in your pc.
But if you want to run a SSH server, you need to install a simple package, called openssh-server.
Type
Code:
sudo apt-get install openssh-server
to install it.
If you install it, then it will be automatically started. So anyone will be able to log on to your PC at anytime, provided that he has your password.


Stage 3: starting/stopping/monitoring ssh server
Like I said, it is started automatically first time you install it.
But if you want to stop/start it manually you need to use two commands. But lets check what happens when you install it for the first time:

Click on image to see bigger version:
[You must be registered and logged in to see this link.]

As you can see, the server is automatically the first time you installed.
Now, lets check if it is really running and how:

Code:
sudo lsof -i -n -P | grep sshd
[sudo] password for lordamit:
sshd      2927    root    3u  IPv4  61966      0t0  TCP *:22 (LISTEN)
sshd      2927    root    4u  IPv6  61968      0t0  TCP *:22 (LISTEN)
as you can see, it is running in TCP port 22. You must be root or sudo to see this.

lets stop ssh:
Code:

sudo /etc/init.d/ssh stop
 * Stopping OpenBSD Secure Shell server sshd                            [ OK ]

or start it:
sudo /etc/init.d/ssh start

How to use SSH to login in another pc:

ssh usernameofremotepc@remotepcIPaddress

for example, if you want connection to a pc of 10.255.2.101, where username is iit, then you need to enter
Code:
ssh [You must be registered and logged in to see this link.]
you will be asked for password of that pc's iit account. If you enter it correctly, you will be logged in.

If you want to login to your own pc, then write:
Code:
ssh yourusernamehere@127.0.0.1
If it asks to enter yes/no, type yes and press enter.
Then give your own password.

Allowing or Denying IP:

You must be sudo or root to edit the files described here.

lets assume that you are running ssh server, and you do not want any outsider to connect to your PC.

This can be done by editing the
/etc/hosts.deny file
if you open it with any text editor, and enter
Code:
All:All

You need to enter two new blank lines after All:All.
It will block all IP, including your IP itself.

if you try to use ssh to enter your own pc, you will see this:

Code:
lordamit@lordamit-Aspire-4745:~$ ssh lordamit@127.0.0.1
ssh_exchange_identification: Connection closed by remote host

However, say you want only one specific IP which can use your PC using ssh.
As hosts.allow file has more precedence compared to hosts.deny file, you can use it to give special permission to IPs.
use any text editor to open

/etc/hosts.allow

and enter:

Code:
All: 127.0.0.1

at the end of file.
Now, if you try to login using

Code:
ssh usernameofyourpc@127.0.0.1

it will ask whether you are sure etc etc.. and you will be logged in Smile
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by BIT0129-Tabassum Mon Oct 25, 2010 4:56 am

My God!! Shocked
What did you do? you gave all these commands and a long post of today's class here!!
What can I say? It's just possible for you dude Smile
Hats off to you!
salute

rep++
BIT0129-Tabassum
BIT0129-Tabassum
Global Moderator
Global Moderator

Course(s) :
  • BIT

Blood Group : A+
Posts : 1496
Points : 2298

http://probe-tabassum.blogspot.com

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by BIT0115-Efat Mon Oct 25, 2010 5:11 am

"jahapan tusi gr8 ho, tofa kabul karo..........." @@ LORD

REP++
BIT0115-Efat
BIT0115-Efat
Service Release
Service Release

Course(s) :
  • BIT

Blood Group : O+
Posts : 779
Points : 1120

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by BIT0117-Ibrahim Mon Oct 25, 2010 12:45 pm

Thank you very much Amit.............
BIT0117-Ibrahim
BIT0117-Ibrahim
Study Moderator
Study Moderator

Course(s) :
  • BIT

Blood Group : B+
Posts : 96
Points : 234

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by BIT0123-KAUSHIK Wed Oct 27, 2010 12:57 am

Only "thank You" is not enough.
Amit- You are great.
BIT0123-KAUSHIK
BIT0123-KAUSHIK
Alpha Release
Alpha Release

Posts : 15
Points : 38

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by BIT0122-Amit Wed Oct 27, 2010 1:26 am

Smile thanks to you all.
I wrote this only with the hope that you guys will be inspired to write similar articles for others in our class.
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Computer Networking Class Details Empty Re: Computer Networking Class Details

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum