Top Banner
Internet Services
39

Internet Services. Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Dec 13, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Internet Services

Page 2: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal network (Intranet) or external network (Internet).

Actually, TCP and IP are two of the protocols that are included in a group of protocols sometimes known as the Internet protocols. Common services are Telnet, FTP, SMTP, HTTP, ICMP, ARP, DNS, ssh, scp, sftp, and others.

WHAT IS AN INTERNET SERVICE?

Page 3: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

There are common services, such as telnet and ftp. These services send all of their traffic in plain text, including

passwords Plain text traffic is extremely easy to eavesdrop on by anyone

between the traffic’s source and destination. Since the Internet has exploded in popularity, running insecure services such as these is not a good idea. That’s why secure replacements have been developed.

These replacements provide stronger authentication controls and encrypt all their traffic to keep your data safe. You should always run secure services instead of insecure services.

Secure Services

Page 4: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Secure Shell, also known as ssh, is a secure telnet replacement that encrypts all traffic, including passwords, using a public/private encryption key exchange protocol.

It provides the same functionality of telnet(insecure), plus other useful functions, such as traffic tunneling.

[root#]ssh [email protected]

ssh

Page 5: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

SSH asks if you want to accept and trust the host key being sent to you. This is asked only once when you log in into the machine for the very first time.

After this first login whenever ssh is done, system asks for password and a regular terminal in returned.

SSH tunnels almost any protocol through it.

Page 6: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

This example creates tunnel for HTTP. This will forward port 80 of your localhost to port 80 if www.example.com

[root#]ssh –f –N –q –L 80:localhost:80 [email protected]

Page 7: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Secure Copy, also known as scp, is part of the ssh package.

scp helps to copy files securely from any machine to any other linux machine provided ssh daemon is running.

The syntax of scp : scp user@host:file1 user@host:file2

scp

Page 8: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

For eg : [root#] scp user1@bscit:demofile

user2@bscit:newfile user1@bscit password : user2@bscit password :

Page 9: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Secure File Transfer Program, also known as sftp, is an FTP client that performs all its functions over ssh.

The syntax for sftp : sftp user@host:file file For eg: [root#] sftp user1@bscit:tyitfile newfile Connecting to bscit.. user1@bscit password :

sftp

Page 10: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

These are insecure services that should not be used, since they trust that the network is absolutely secure. Their secure equivalents should be used instead.

Less secure services

Page 11: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

telnet is a protocol and application that enables someone to have access to a virtual terminal on a remote host. It resembles text-based console access on a Unix machine.

Telnet is an application that’s available almost everywhere.

Because of this distribution, most beginning Unix users use Telnet exclusively to communicate with other Unix and NT machines.

telnet

Page 12: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

SSH works almost similar to telnet but with encrypted traffic and passwords.

[root#]telnet example.com

Page 13: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

ftp is a file transfer protocol that runs over ports 20 and 21.

Once you have successfully logged on to an ftp server, you can type help for a list of available commands.

Two important commands to remember are put to move a file from your machine to the remote machine, and get to pull a file from the remote server to your machine.

To send multiple files you can use mput, and to retrieve multiple files you can use mget.

ftp

Page 14: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

For eg: ftp:> get file1 ftp:> put file2 ftp:> mget file1 file2 file3 ftp:> mput file1 file2 file3

Page 15: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

rsync is an unencrypted file transfer program . It includes the feature of allowing to find the differences between two sets of files on two machines to be transferred across the network.

It listens to port 873.

rsync

Page 16: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

rlogin is a remote login program that connects your terminal to a remote machine’s terminal.

rlogin is an insecure protocol, because it sends all information, including passwords, in plain-text.

It also enables an mutual trust relationship to exist between machines.

Syntax : [root#]rlogin remotehostname Eg : [root#] rlogin redhat

rlogin

Page 17: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

rsh is an unencrypted mechanism to execute commands on remote hosts.

rsh’s syntax is : [root#]rsh remotehostname

remotecommand Eg : [root#] rsh redhathost shutdown

rsh

Page 18: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

finger enables users on remote systems to look up information about users on another system.

finger displays information as user’s login name, real name, terminal name, idle time, login time, home directory, shell etc.

finger should be disabled outside local network as user information could be accessed easily.

finger

Page 19: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

finger daemon listens on port 79. Syntax : [root#] finger username@hostname [root#] finger [email protected]

Page 20: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Talk and ntalk are real-time chat protocols. The talk server runs on port 517 and the ntalk server runs on port 518.

To send someone else a talk request, type talk or ntalk username@hostname.

If their server is running a talk or ntalk daemon and they are logged in, they will see a message inviting them to chat with you.

Talk and ntalk

Page 21: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Syntax : [root#]talk username@hostname [root#]ntalk username@hostname Eg: [root#]talk [email protected] [root#]ntalk [email protected]

Page 22: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Following protocols are used : 1. http The most common Web server used on Linux

is Apache. Apache is easily configurable, and its configuration files live in /etc/httpd/conf/.

While Apache can be set to listen to many different network ports, the most common port it listens on is port 80.

Linux as Server

Page 23: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

To start httpd use command : [root#] service httpd start To enable it at boot : [root#] chkconfig httpd ON

Page 24: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

2. sshd Its global system configuration files are in

/etc/ssh, and users’ ssh configuration files are in $HOME/.ssh/.

The ssh server listens on port 22. If the port is blocked by firewall and not

available then ssh can be made to run on another port also.

Page 25: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

To start sshd use command : [root#] service sshd start To enable it at boot : [root#] chkconfig sshd ON

Page 26: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

3. ftpd The FTP daemon uses ports 20 and 21 to

listen for and initiate FTP requests. Its configuration files ftpaccess,

ftpconversions, ftpgroups, ftphosts, and ftpusers, are located in the /etc directory.

 

Page 27: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

4. dns The Domain Name Service (DNS), which

maps IP addresses to hostnames. It runs on port 53. Its configuration file is named.conf in the

/etc directory.

Page 28: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

To start dns use command : [root#] service named start To enable it at boot : [root#] chkconfig named ON

Page 29: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

inetd is called an Internet superserver. It is launched at boot time, and listens for connections on network sockets.

When inetd starts up, it checks the inetd.conf file to see what services should be running. It then reads the /etc/services file to see what ports those services should be running on.

Inetd Server

Page 30: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

It is an extended version of inetd that adds more security and features.

In has new features for system administrators. It starts at boot time and listen for connections

to come in from different ports in its configuration file.

Once xientd receives connection request, then xientd spawns a new server and keeps listening for a new connection on a different port.

Xinetd Server

Page 31: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

In xinetd anyone can start network service whereas in inetd only root can start the network service.

Xientd has inbuilt firewall capability as it provides access control on all services based on various criteria, such as remote host address, access time, remote hostname etc.

Page 32: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Xientd kills servers that are not in the configuration file thereby preventing configuration’s access criteria.

Xinetd also has log storage. Configuration file for xientd is

/etc/xientd.conf

Page 33: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

defaults { instances=60 log_type=syslog log_on_success=Host PID log_on_failure = Host PID } includedir /etc/xientd.d

/etc/xientd.conf

Page 34: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Start the service : [root#] service xientd start After Any changes in file : [root#] service xientd restart

Page 35: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

ntalk-chat server runs on port 518 rsync:remote ftp telnet: telnet server finger:user information lookup program kshell:restricts user access to shell rlogin:remote login trusted rsh:remote shell to connect to remote host

Xinetd started services

Page 36: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

talk:chat server runs on port 517 klogin:rlogin server over kerboros chargen:generates random charater on TCP time:gives u time chargen-udp : generates random charater on

UDP time-upd : gives time on UDP comsat : sends notification of new mail

Page 37: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

sendmail : mail server apache : web server sshd : ssh server qmail : mail server postfix : mail server named : DNS server xfs : X font server portmap : maps RPC services to port rpc.quotad : serves quota information rpc.mountd : NFS mount server squid : web proxy server oracle : database server

Stand-Alone Services

Page 38: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Linux provides a few different mechanisms for system security. One of these mechanisms is Linux’s firewall packages.

iptables is Fedora’s and Red Hat’s built-in firewall administration tool.

iptables also enables personal firewall on Linux machine.

Linux Firewall

Page 39: Internet Services.  Basically, an Internet Service can be defined as any service that can be accessed through TCP/IP based networks, whether an internal.

Commands to manage Iptables are : [root#] service iptables start [root#] service iptables stop On Boot : [root#] chkconfig iptables ON [root#] chkconfig iptables OFF