1 / 42

Internet Applications

Internet Applications. INTERNET APPLICATIONS. Internet Applications. Internet Applications. Domain Name Service Proxy Service Mail Service Web Service. DNS. DNS. DNS. Internet Naming Hierarchy. The silent dot at the end of all addresses. .org. .in. .com. .net. .tcd. .co. .ac.

allayna
Download Presentation

Internet Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Applications INTERNET APPLICATIONS

  2. Internet Applications Internet Applications • Domain Name Service • Proxy Service • Mail Service • Web Service

  3. DNS DNS

  4. DNS Internet Naming Hierarchy The silent dot at the end of all addresses .org .in .com .net .tcd .co .ac .iitk www www

  5. DNS Setup DNS Operation • A DNS server maintains the name to IP address mapping of the domain for which it is the name server. • The DNS server for a domain is registered with the domain registrar and the entry is maintained by the Internet Root-Servers (13) or Country Level Root-Servers. • Whenever a server is queried, if doesn’t have the answer, the root servers are contacted. • The root servers refer to the DNS server for that domain (in case the domain is a top level domain) or the Country Root Server (in case the domain is country level domain).

  6. DNS Setup DNS CONFIGURATION

  7. DNS Setup DNS Configuration • named daemon is used • A DNS Server may be caching/master/slave server • The named.ca file has information of all Root Servers. • There is a Forward Zone file and a Reverse Zone file for every domain. • Configuration file: /var/named/chroot/etc/named.conf • Forward Zone File: /var/named/chroot/var/named/<forward_zone_file> • Reverse Zone File: /var/named/chroot/var/named/<reverse_zone_file>

  8. DNS Setup Sample Master named.conf zone "." { type hint; file "named.ca"; }; zone "0.0.127.in-addr.arpa" { type master; file "named.local"; allow-query {any;}; }; zone "iitk.ac.in" { type master; file "hosts.db"; allow-query {any;}; }; zone "95.200.203.IN-ADDR.ARPA" { type master; file "hosts.rev.203.200.95"; allow-query {any;}; }; zone "iitk.ernet.in" { type slave; file "hosts.iitk.ernet.in"; masters { 202.141.40.10; }; allow-query {any;};

  9. DNS Setup Sample Forward Zone File $TTL 86400 @ IN SOA ns1.iitk.ac.in. root.ns1.iitk.ac.in. ( 200605091 ; Serial 10800 ; Refresh - 3 hours 3600 ; Retry - 1 hour 1209600 ;Expire - 1 week 43200 ) ; Minimum TTL for negative answers - 12 hours IN NS ns1.iitk.ac.in. IN NS ns2.iitk.ac.in. IN MX 5 mail0.iitk.ac.in. IN MX 10 mail1.iitk.ac.in. IN MX 20 mail2.iitk.ac.in. $ORIGIN iitk.ac.in. ns1 IN A 203.200.95.142 mail0 IN A 203.200.95.144 proxy IN CNAME mail0

  10. DNS Setup Sample Reverse Zone File $TTL 86400 $ORIGIN 200.203.in-addr.arpa. 95 IN SOA ns1.iitk.ac.in. root.ns1.iitk.ac.in. ( 200605091 ; Serial 10800 ; Refresh - 5 minutes 3600 ; Retry - 1 minute 1209600 ; Expire - 1 weeks 43200 ) ; Minimum TTL for negative answers - 12 hours IN NS ns1.iitk.ac.in. IN NS ns2.iitk.ac.in. $ORIGIN 95.200.203.in-addr.arpa. ; ; 142 IN PTR ns1.iitk.ac.in. 144 IN PTR mail0.iitk.ac.in.

  11. DNS Setup Configuring Local Resolver • /etc/resolv.conf server 127.0.0.1

  12. DNS Setup Test DNS • nslookup • host • dig • Test your DNS with the following DNS diagnostics web site: dnsstuff.com

  13. Proxy Server PROXY SERVER

  14. Proxy Server Internet Connections ISP network ISP network Backbone networks Bandwidth-limitedlinks ISPnetwork • Customers connect to an ISP • ISPs connect to backbone Customer Networks

  15. Proxy Server Internet Connections Cost of connections is based on bandwidth Cost of connection is a major part of network cost Organisations only obtain as much bandwidth as they can afford Many organisations in Asia-Pacific only have 64kb/s – 2Mb/s connections (as compared to their counterpart in US and Europe who have bandwidths of 2.4 Gbps – 10 Gbps)

  16. Proxy Server What is a Web Proxy? • A proxy is a host which relays web access requests from clients • Used when clients do not access the web directly • Used for security, logging, accounting and performance browser proxy web

  17. Proxy Server What is Web Caching? • Storing copies of recently accessed web pages • Pages are delivered from the cache when requested again • Browser caches • Proxy caches

  18. Proxy Server Why Cache? • Shorter response time • Reduced bandwidth requirement • Reduced load on servers • Access control and logging

  19. Proxy Server Popular Proxy Caches • Apache proxy • MS proxy server • WinProxy • Squid • Squid is popular because it is powerful, configurable and free • Many others

  20. Squid Setup SQUID SETUP

  21. Squid Setup Obtaining Squid • Source code (in C) from www.squid-cache.org • Binary executables • Linux (comes with RedHat and others) • FreeBSD • Windows • Pre-installed in Fedora/Enterprise Linux

  22. Squid Setup Basic Settings • Edit the /etc/squid/squid.conf file to configure squid • Configuration options: • Disk Cache size and location • Authentication • Allowed Hosts • Any other access restrictions (sites, content, size, time of access etc.) using ACL • service squid start/stop/restart

  23. Squid Setup Disc Requirements • Squid makes very heavy use of disc because of heavy read/write in cache • Needs discs with low seek times • SCSI is better • Can spread cache over 2 or more discs • Raid not recommended • Cached data is not critical

  24. Squid Setup Calculating Disc Space • Recommend keeping at least 2 days worth of objects • 10 days may be better • Example: • 256Kbps link loaded 10 hrs/day ~= 1GB • assume 50% cacheable - .5GB / day • 2 days objects - 1GB • 10 days objects - 5 GB

  25. Squid Setup Squid.conf Basic Configuration • cache_dir ufs /var/spool/squid/cache 100 16 256 • auth_param basic program /usr/lib/squid/ncsa_auth /etc/shadow • acl sidbiusers proxy_auth required • http_access allow sidbiusers • acl our_network src 172.28.250.0/24 • http_access allow our_network (Note: use squid –z for the first time to create the cache directory and its subdirectories)

  26. Web Server WEB SERVER

  27. Web Server Web Server • HTTP (Hyper Text Transfer Protocol) is used to transfer web pages from a Web Server to Web Client (Browser) • Web Pages are arranged in a directory structure in the Web Server • HTTP supports CGI (Common Gateway interface) • HTTP supports Virtual Hosting (Hosting multiple sites on the same server) • Popular Web Servers • Apache • Windows IIS • IBM Websphere

  28. Apache Setup APACHE SETUP

  29. Web Server Setup Web Server • Apache Web Server is used • Daemon is httpd (service httpd start/stop/restart)

  30. Web Server Setup Files used by Apache • Configuration file: /etc/httpd/conf/httpd.conf • Log files: /var/log/httpd/access_log and /var/log/httpd/error_log • Modules /etc/httpd/modules • Default Document Root /var/www/html • Default CGI Root /var/www/cgi-bin

  31. Web Server Setup Apache Configuration Directives • Server Name • Min and Max Servers • Document Root • CGI Enable/Disable • User Directory • Directory Index • Mime Types • Modules • Access Restrictions • Secure Server • Virtual Hosting

  32. Web Server Setup Basic Settings • Change the default value for ServerName www.<your-domain.com> in httpd.conf and put the website content in /var/www/html • Additionally you can configure Name based Virtual Hosting (allow more than one websites to run on the same server)

  33. Web Server Setup Virtual Hosting NameVirtualHost *:80 <VirtualHost *:80> ServerName server-name DocumentRoot path-to-virtual-document-root </VirtualHost> <VirtualHost *:80> ServerName server-name DocumentRoot path-to-virtual-document-root </VirtualHost>

  34. Email EMAIL

  35. Email Mail Architecture Internet Mail Server Mail Server Mail Client Mail Client

  36. Email Mail Architecture

  37. Email Mail Architecture • Simple Mail Transfer Protocol (SMTP) is used to transfer mail between Mail Servers over Internet • Post Office Protocol (PoP) and Interactive Mail Access Protocol (IMAP) is used between Client and Mail Server to retrieve mails • The mail server of a domain is identified by the MX record of that domain • Popular Mail Servers • Sendmail/Postfix • Microsoft Exchange Server • IBM Lotus

  38. Sendmail Setup SENDMAIL SETUP

  39. Mail Server Setup Sendmail Configuration • Daemon: sendmail • Configuration File: /etc/mail/sendmail.mc Edit the following lines • LOCAL_DOMAIN(`localhost.localdomain')dnl (Replace localhost.localdomain by the domain name for which the mail server is being configured) • DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl (comment this line by adding dnl at the start of the line) • dnl MASQUERADE_AS(`mydomain.com')dnl (remove dnl & replace mydomain.com by the domain name)

  40. Sendmail Setup Sendmail Configuration • Add the range of IP addresses of your network in access file (e.g. 172.31. Relay) • Run “make –C /etc/mail” command to compile sendmail.mc and generate sendmail.cf file. • Restart sendmail and watch for errors

  41. Sendmail Setup PoP & IMAP Server • PoP3 & IMAP Server can be started using dovecot server. (service dovecot start)

More Related